pub struct Path(/* private fields */);Expand description
Position in the tree: the sequence of slot indices from the root.
Implementations§
Source§impl Path
impl Path
Sourcepub fn last(&self) -> Option<usize>
pub fn last(&self) -> Option<usize>
Last index, i.e. the slot of the parent that holds this node.
Sourcepub fn split_last(&self) -> Option<(Self, usize)>
pub fn split_last(&self) -> Option<(Self, usize)>
Split into the parent path and the final index.
pub fn push(&mut self, index: usize)
pub fn pop(&mut self) -> Option<usize>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_slice(&self) -> &[usize]
Trait Implementations§
impl Eq for Path
Source§impl FromIterator<usize> for Path
impl FromIterator<usize> for Path
Source§impl Ord for Path
impl Ord for Path
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Path
impl PartialOrd for Path
impl StructuralPartialEq for Path
Auto Trait Implementations§
impl Freeze for Path
impl RefUnwindSafe for Path
impl Send for Path
impl Sync for Path
impl Unpin for Path
impl UnsafeUnpin for Path
impl UnwindSafe for Path
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