[][src]Enum hashed_permutation::PermutationError

pub enum PermutationError {
    ShuffleOutOfRange {
        shuffle: u32,
        max_shuffle: u32,
    },
    LengthTooSmall {},
}

Variants

ShuffleOutOfRange

This error is invoked when the caller attempts to use an index on the shuffle method that is larger than the size of the set.

The user can only shuffle indices that are within the set, otherwise the hashing algorithm does not work. shuffle is the index that the user called, and max_shuffle is the size of the permutation set (which is also the upper bound for the calling index).

Fields of ShuffleOutOfRange

shuffle: u32max_shuffle: u32
LengthTooSmall

This error represents the case where a permutation struct is created with a length that is too small (0).

Fields of LengthTooSmall

Trait Implementations

impl Debug for PermutationError[src]

impl Display for PermutationError[src]

Auto Trait Implementations

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> ToString for T where
    T: Display + ?Sized
[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.