Struct unchecked_index::UncheckedIndex
[−]
[src]
pub struct UncheckedIndex<S>(_);
Wrapper type for unchecked indexing through the regular index syntax
Note that the indexing is checked with debug assertions, but unchecked in release mode. Test your code responsibly.
Trait Implementations
impl<S: Copy> Copy for UncheckedIndex<S>
[src]
impl<S: Copy> Clone for UncheckedIndex<S>
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Deref for UncheckedIndex<T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Dereferences the value.
impl<T> DerefMut for UncheckedIndex<T>
[src]
impl<T, I> Index<I> for UncheckedIndex<T> where
T: GetUnchecked<I>,
[src]
T: GetUnchecked<I>,
type Output = T::Output
The returned type after indexing.
fn index(&self, index: I) -> &Self::Output
[src]
Access the element(s) at index
, without bounds checks!
Note: Will use debug assertions to check that the index is actually valid. In release mode, debug assertions are off by default.
Safety
The caller must ensure that index
is always in bounds of the
underlying container.
impl<T, I> IndexMut<I> for UncheckedIndex<T> where
T: GetUncheckedMut<I>,
[src]
T: GetUncheckedMut<I>,
fn index_mut(&mut self, index: I) -> &mut Self::Output
[src]
Access the element(s) at index
, without bounds checks!
Note: Will use debug assertions to check that the index is actually valid. In release mode, debug assertions are off by default.
Safety
The caller must ensure that index
is always in bounds of the
underlying container.