[][src]Struct skew_forest::SkewPath

pub struct SkewPath<A: SkewPathArray> { /* fields omitted */ }

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]

impl<A: SkewPathArray> Eq for SkewPath<A>[src]

impl<A: SkewPathArray> Ord for SkewPath<A>[src]

impl<A: SkewPathArray> PartialEq<SkewPath<A>> for SkewPath<A>[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

impl<A> Send for SkewPath<A> where
    <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

impl<A> Unpin for SkewPath<A> where
    <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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.