[−][src]Struct skew_forest::SkewPath
A path in a tree in a SkewForest
. This can be seen as an index into a path in a specific
SkewForest
, and must therefore only be used with a single SkewForest
.
The type parameter A
denotes the path node array used internally by this path. The capacity of
this path depends on the length of the array. If the length of this array is n
then the
capacity will be 2.pow(n) - 1
.
The memory size and the cost of cloning a SkewPath
is proportional to the length of the array.
Methods
impl<A: SkewPathArray> SkewPath<A>
[src]
pub fn last(&self) -> Option<SkewIndex<A::Idx>>
[src]
Return the last value in this path or None
if the path is empty.
pub fn len(&self) -> usize
[src]
The number of nodes of this path.
pub fn is_empty(&self) -> bool
[src]
Returns true if there are no nodes in this path and false otherwise.
Trait Implementations
impl<A: SkewPathArray> Clone for SkewPath<A>
[src]
impl<A: SkewPathArray> Debug for SkewPath<A>
[src]
impl<A> Default for SkewPath<A> where
A: SkewPathArray,
[src]
A: SkewPathArray,
impl<A: SkewPathArray> Eq for SkewPath<A>
[src]
impl<A: SkewPathArray> Ord for SkewPath<A>
[src]
fn cmp(&self, other: &SkewPath<A>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<A: SkewPathArray> PartialEq<SkewPath<A>> for SkewPath<A>
[src]
fn eq(&self, other: &SkewPath<A>) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<A: SkewPathArray> PartialOrd<SkewPath<A>> for SkewPath<A>
[src]
Auto Trait Implementations
impl<A> RefUnwindSafe for SkewPath<A> where
<A as SkewPathArray>::Array: RefUnwindSafe,
<<A as SkewPathArray>::Array as Array>::Index: RefUnwindSafe,
<A as SkewPathArray>::Array: RefUnwindSafe,
<<A as SkewPathArray>::Array as Array>::Index: RefUnwindSafe,
impl<A> Send for SkewPath<A> where
<A as SkewPathArray>::Array: Send,
<<A as SkewPathArray>::Array as Array>::Index: Send,
<A as SkewPathArray>::Array: Send,
<<A as SkewPathArray>::Array as Array>::Index: Send,
impl<A> Sync for SkewPath<A> where
<A as SkewPathArray>::Array: Sync,
<<A as SkewPathArray>::Array as Array>::Index: Sync,
<A as SkewPathArray>::Array: Sync,
<<A as SkewPathArray>::Array as Array>::Index: Sync,
impl<A> Unpin for SkewPath<A> where
<A as SkewPathArray>::Array: Unpin,
<<A as SkewPathArray>::Array as Array>::Index: Unpin,
<A as SkewPathArray>::Array: Unpin,
<<A as SkewPathArray>::Array as Array>::Index: Unpin,
impl<A> UnwindSafe for SkewPath<A> where
<A as SkewPathArray>::Array: UnwindSafe,
<<A as SkewPathArray>::Array as Array>::Index: UnwindSafe,
<A as SkewPathArray>::Array: UnwindSafe,
<<A as SkewPathArray>::Array as Array>::Index: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,