Struct indexing::Index
[−]
[src]
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 indices()
constructor.
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]
fn integer(&self) -> usize
[src]
Return the index as an integer offset from the start of the container
impl<'id> Index<'id, NonEmpty>
[src]
Trait Implementations
impl<'id, P> Debug 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
fn eq(&self, rhs: &Index<'id, Q>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'id, P> Eq for Index<'id, P>
[src]
impl<'id, P, Q> PartialOrd<Index<'id, Q>> for Index<'id, P>
[src]
fn partial_cmp(&self, rhs: &Index<'id, Q>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, rhs: &Index<'id, Q>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<'id, P> Ord for Index<'id, P>
[src]
fn cmp(&self, rhs: &Self) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl<'id, P> Hash for Index<'id, P>
[src]
fn hash<H: Hasher>(&self, h: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'id, P> Provable for Index<'id, P>
[src]
type Proof = P
type WithoutProof = Index<'id, Unknown>
fn no_proof(self) -> Self::WithoutProof
[src]
Return a copy of self with the proof parameter set to Unknown
.