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> Clone for UncheckedIndex<S>[src]

impl<S: Copy> Copy for UncheckedIndex<S>[src]

impl<T> Deref for UncheckedIndex<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for UncheckedIndex<T>[src]

impl<T, I> Index<I> for UncheckedIndex<T> where
    T: GetUnchecked<I>, 
[src]

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]

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.

Auto Trait Implementations

impl<S> Send for UncheckedIndex<S> where
    S: Send

impl<S> Sync for UncheckedIndex<S> where
    S: Sync

impl<S> Unpin for UncheckedIndex<S> where
    S: Unpin

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.