[][src]Enum moveslice::Error

pub enum Error {
    OutOfBoundsMove {
        len: usize,
        dest: (usize, usize),
    },
    InvalidBounds {
        len: usize,
        bounds: (usize, usize),
    },
}

This Error enum has a single variant, which is used to return additional information about the out of bounds error, to help diagnostics.

Is used/returned by try_moveslice.

Variants

OutOfBoundsMove

This error signifies an out of bounds error. It also contains the length of the slice, and the supposed location of where the chunk would have been.

For example: OutOfBoundsMove {len: 10, dest: (8,11)}

Fields of OutOfBoundsMove

len: usize

The length of the array/slice being modified.

dest: (usize, usize)

The location of where the chunk would have ended up.

InvalidBounds

This error signifies an invalid bounds error. If the bounds passed are already out of bounds, this error is returned instead. This is to differentiate between the two out-of-bounds cases.

Fields of InvalidBounds

len: usizebounds: (usize, usize)

Trait Implementations

impl Debug for Error[src]

Auto Trait Implementations

impl Unpin for Error

impl Sync for Error

impl Send for Error

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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.

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

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

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