Struct narwhal_dag::NodeRef
source · [−]pub struct NodeRef<T>(_);
Expand description
Reference-counted pointers to a Node
Implementations
sourceimpl<T> NodeRef<T>
impl<T> NodeRef<T>
sourcepub fn from_pointee(val: Node<T>) -> Self
pub fn from_pointee(val: Node<T>) -> Self
Returns a NodeRef pointing at the Node passed as argument
Example
use narwhal_dag::{ Node, NodeRef };
let node = Node::new_leaf(1, false);
// Note the 2 derefs: one for the newtype, one for the Arc
assert_eq!(Node::new_leaf(1, false), **NodeRef::from_pointee(node));
Trait Implementations
impl<T> Eq for NodeRef<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for NodeRef<T>where
T: RefUnwindSafe,
impl<T> Send for NodeRef<T>where
T: Send + Sync,
impl<T> Sync for NodeRef<T>where
T: Send + Sync,
impl<T> Unpin for NodeRef<T>
impl<T> UnwindSafe for NodeRef<T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more