[][src]Struct indexing::Index

pub struct Index<'id, Proof = NonEmpty> { /* fields omitted */ }

A branded index.

Index<'id> only indexes the container instantiated with the exact same particular lifetime for the parameter 'id at its inception from the scope() function.

The type parameter Proof determines if the index is dereferenceable.

A NonEmpty index points to a valid element. An Unknown index is unknown, or it points to an edge index (just past the end).

Methods

impl<'id, P> Index<'id, P>[src]

pub fn integer(&self) -> usize[src]

Return the index as an integer offset from the start of the container

impl<'id> Index<'id, NonEmpty>[src]

pub fn after(self) -> Index<'id, Unknown>[src]

Return the index directly after.

Trait Implementations

impl<'id, P> Provable for Index<'id, P>[src]

type Proof = P

type WithoutProof = Index<'id, Unknown>

impl<'id, P> Eq for Index<'id, P>[src]

impl<'id, P> Clone for Index<'id, P>[src]

impl<'id, P, Q> PartialOrd<Index<'id, Q>> for Index<'id, P>[src]

impl<'id, P> Ord for Index<'id, P>[src]

impl<'id, P, Q> PartialEq<Index<'id, Q>> for Index<'id, P>[src]

Index can only be compared with other indices of the same branding

impl<'id, P> Copy for Index<'id, P>[src]

impl<'id, P> Hash for Index<'id, P>[src]

impl<'id, Array, M> Index<Index<'id, NonEmpty>> for Container<'id, Array, M> where
    Array: GetUnchecked
[src]

&self[i] where i is an Index<'id>.

type Output = Array::Item

The returned type after indexing.

impl<'id, Array, M> IndexMut<Index<'id, NonEmpty>> for Container<'id, Array, M> where
    Array: GetUncheckedMut
[src]

&mut self[i] where i is an Index<'id>.

impl<'id, P> Debug for Index<'id, P>[src]

Auto Trait Implementations

impl<'id, Proof> Unpin for Index<'id, Proof> where
    Proof: Unpin

impl<'id, Proof> Sync for Index<'id, Proof> where
    Proof: Sync

impl<'id, Proof> Send for Index<'id, Proof> where
    Proof: Send

impl<'id, Proof> UnwindSafe for Index<'id, Proof> where
    Proof: UnwindSafe

impl<'id, Proof> RefUnwindSafe for Index<'id, Proof> where
    Proof: RefUnwindSafe

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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