[][src]Struct wrapping::WrappingSlice

pub struct WrappingSlice<'a, T>(_);

A slice that wraps around its size.

It derefs to the underlying slice, so it implements all of the same functions as a slice, with the exception of indexing.

Example

use wrapping::WrappingSlice;

let array: [&str; 1] = ["hello"];
let wrapping = WrappingSlice::from(&array[..]);

assert_eq!(wrapping[0], "hello");
assert_eq!(wrapping[1], "hello");

Trait Implementations

impl<'a, T> Deref for WrappingSlice<'a, T>[src]

type Target = [T]

The resulting type after dereferencing.

impl<'a, T, I: Into<&'a [T]>> From<I> for WrappingSlice<'a, T>[src]

impl<'a, T> Index<usize> for WrappingSlice<'a, T>[src]

type Output = T

The returned type after indexing.

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for WrappingSlice<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for WrappingSlice<'a, T> where
    T: Sync

impl<'a, T> Sync for WrappingSlice<'a, T> where
    T: Sync

impl<'a, T> Unpin for WrappingSlice<'a, T>

impl<'a, T> UnwindSafe for WrappingSlice<'a, T> where
    T: RefUnwindSafe

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> Same<T> for T

type Output = T

Should always be Self

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.