pub struct Node<Payload, Edge, Children = Vec<usize>> { /* private fields */ }Expand description
A node in the tree. A Node can carry a Payload, and annotate the
branch to its parent with an Edge.
Implementations§
Source§impl<Payload, Edge> Node<Payload, Edge>
impl<Payload, Edge> Node<Payload, Edge>
Sourcepub fn data_mut(&mut self) -> &mut Payload
pub fn data_mut(&mut self) -> &mut Payload
If this node has a Payload, returns a mutable reference to it
Sourcepub fn set_branch(&mut self, e: Edge)
pub fn set_branch(&mut self, e: Edge)
Set the [Edge] of this node parent branch
Sourcepub fn unset_branch(&mut self)
pub fn unset_branch(&mut self)
Unset the [Edge] of this node parent branch
Auto Trait Implementations§
impl<Payload, Edge, Children> Freeze for Node<Payload, Edge, Children>
impl<Payload, Edge, Children> RefUnwindSafe for Node<Payload, Edge, Children>
impl<Payload, Edge, Children> Send for Node<Payload, Edge, Children>
impl<Payload, Edge, Children> Sync for Node<Payload, Edge, Children>
impl<Payload, Edge, Children> Unpin for Node<Payload, Edge, Children>
impl<Payload, Edge, Children> UnwindSafe for Node<Payload, Edge, Children>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more