[−][src]Struct indexing::Index
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]
Trait Implementations
impl<'id, P> Provable for Index<'id, P>
[src]
impl<'id, P> Eq for Index<'id, P>
[src]
impl<'id, P> Clone for Index<'id, P>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn lt(&self, rhs: &Index<'id, Q>) -> bool
[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'id, P> Ord for Index<'id, P>
[src]
fn cmp(&self, rhs: &Self) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[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]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'id, P> Copy for Index<'id, P>
[src]
impl<'id, P> Hash for Index<'id, P>
[src]
fn hash<H: Hasher>(&self, h: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'id, Array, M> Index<Index<'id, NonEmpty>> for Container<'id, Array, M> where
Array: GetUnchecked,
[src]
Array: GetUnchecked,
&self[i]
where i
is an Index<'id>
.
type Output = Array::Item
The returned type after indexing.
fn index(&self, index: Index<'id>) -> &Self::Output
[src]
impl<'id, Array, M> IndexMut<Index<'id, NonEmpty>> for Container<'id, Array, M> where
Array: GetUncheckedMut,
[src]
Array: GetUncheckedMut,
&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,
Proof: Unpin,
impl<'id, Proof> Sync for Index<'id, Proof> where
Proof: Sync,
Proof: Sync,
impl<'id, Proof> Send for Index<'id, Proof> where
Proof: Send,
Proof: Send,
impl<'id, Proof> UnwindSafe for Index<'id, Proof> where
Proof: UnwindSafe,
Proof: UnwindSafe,
impl<'id, Proof> RefUnwindSafe for Index<'id, Proof> where
Proof: RefUnwindSafe,
Proof: RefUnwindSafe,
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,