pub struct Node { /* private fields */ }Implementations§
Source§impl Node
impl Node
pub fn idx(&self) -> usize
pub fn parent(&self) -> Option<usize>
pub fn children(&self) -> impl Iterator<Item = usize>
pub fn level(&self) -> usize
Sourcepub fn leaves(&self) -> impl Iterator<Item = usize> + Clone
pub fn leaves(&self) -> impl Iterator<Item = usize> + Clone
An iterator over all leaf indices under this node.
pub fn is_leaf(&self) -> bool
pub fn is_root(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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