pub struct Index<'id, Proof = NonEmpty> { /* private fields */ }
Expand description
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).
Implementations§
Trait Implementations§
Source§impl<'id, Array, M> Index<Index<'id>> for Container<'id, Array, M>where
Array: GetUnchecked,
&self[i]
where i
is an Index<'id>
.
impl<'id, Array, M> Index<Index<'id>> for Container<'id, Array, M>where
Array: GetUnchecked,
&self[i]
where i
is an Index<'id>
.
Source§impl<'id, Array, M> IndexMut<Index<'id>> for Container<'id, Array, M>where
Array: GetUncheckedMut,
&mut self[i]
where i
is an Index<'id>
.
impl<'id, Array, M> IndexMut<Index<'id>> for Container<'id, Array, M>where
Array: GetUncheckedMut,
&mut self[i]
where i
is an Index<'id>
.
Source§impl<'id, P> Ord for Index<'id, P>
impl<'id, P> Ord for Index<'id, P>
Source§impl<'id, P, Q> PartialEq<Index<'id, Q>> for Index<'id, P>
Index can only be compared with other indices of the same branding
impl<'id, P, Q> PartialEq<Index<'id, Q>> for Index<'id, P>
Index can only be compared with other indices of the same branding
Source§impl<'id, P, Q> PartialOrd<Index<'id, Q>> for Index<'id, P>
impl<'id, P, Q> PartialOrd<Index<'id, Q>> for Index<'id, P>
impl<'id, P> Copy for Index<'id, P>
impl<'id, P> Eq for Index<'id, P>
Auto Trait Implementations§
impl<'id, Proof> Freeze for Index<'id, Proof>
impl<'id, Proof> RefUnwindSafe for Index<'id, Proof>where
Proof: RefUnwindSafe,
impl<'id, Proof> Send for Index<'id, Proof>where
Proof: Send,
impl<'id, Proof> Sync for Index<'id, Proof>where
Proof: Sync,
impl<'id, Proof> Unpin for Index<'id, Proof>where
Proof: Unpin,
impl<'id, Proof> UnwindSafe for Index<'id, Proof>where
Proof: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more