pub struct Node<P: Prefixable, D> { /* private fields */ }
Expand description
Node struct.
Implementations§
Source§impl<P: Prefixable, D> Node<P, D>
Node impl.
impl<P: Prefixable, D> Node<P, D>
Node impl.
Sourcepub fn from_common(prefix1: &P, prefix2: &P) -> Node<P, D>
pub fn from_common(prefix1: &P, prefix2: &P) -> Node<P, D>
Return new node with common prefix.
Sourcepub fn child(&self, bit: Child) -> Option<Rc<Node<P, D>>>
pub fn child(&self, bit: Child) -> Option<Rc<Node<P, D>>>
Return one of child node - left(0) or right(1)
Sourcepub fn child_with(&self, bit: u8) -> Option<Rc<Node<P, D>>>
pub fn child_with(&self, bit: u8) -> Option<Rc<Node<P, D>>>
Return one of child node - left(0) or right(1)
Sourcepub fn has_child_with(&self, bit: u8) -> bool
pub fn has_child_with(&self, bit: u8) -> bool
Return true if child at left or right.
Sourcepub fn set_parent(&self, parent: Rc<Node<P, D>>)
pub fn set_parent(&self, parent: Rc<Node<P, D>>)
Set parent.
Sourcepub fn unset_parent(&self)
pub fn unset_parent(&self)
Unset parent.
Sourcepub fn unset_data(&self) -> Option<D>
pub fn unset_data(&self) -> Option<D>
Unset data.
Sourcepub fn next_with_data(&self) -> Option<Rc<Node<P, D>>>
pub fn next_with_data(&self) -> Option<Rc<Node<P, D>>>
Return next Node with data.
Auto Trait Implementations§
impl<P, D> !Freeze for Node<P, D>
impl<P, D> !RefUnwindSafe for Node<P, D>
impl<P, D> !Send for Node<P, D>
impl<P, D> !Sync for Node<P, D>
impl<P, D> Unpin for Node<P, D>
impl<P, D> !UnwindSafe for Node<P, D>
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