Struct unchecked_index::UncheckedIndex [−][src]
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]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<S: Copy> Copy for UncheckedIndex<S>
[src]
impl<T> Deref for UncheckedIndex<T>
[src]
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.
Auto Trait Implementations
impl<S> Send for UncheckedIndex<S> where
S: Send,
S: Send,
impl<S> Sync for UncheckedIndex<S> where
S: Sync,
S: Sync,
impl<S> Unpin for UncheckedIndex<S> where
S: Unpin,
S: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,