[][src]Enum counting_sort::CountingSortError

pub enum CountingSortError {
    IntoIndexFailed(&'static str),
    IteratorEmpty(&'static str),
    SortingUnnecessary(&'static str),
    MinValueLargerMaxValue(&'static str),
    IndexOutOfBounds(&'static str),
}

This enumeration is a list of all possible errors that can happen during cnt_sort or cnt_sort_min_max.

Variants

IntoIndexFailed(&'static str)

The conversion from a value of the to-be-sorted type T into an index (usize) failed. Most likely due to an overflow happening.

IteratorEmpty(&'static str)

The iterator is empty and therefore nothing can be sorted.

SortingUnnecessary(&'static str)

The minimum value is equal to the maximum value, this means sorting is unnecessary.

MinValueLargerMaxValue(&'static str)

The minimum value is larger than the maximum value, most likely due to calling cnt_sort_min_max with the switched parameters.

IndexOutOfBounds(&'static str)

The converted index is still larger than the length of the count value vector. This happens when the given maximum value is smaller than the actual maximum value when cnt_sort_min_max is used.

Trait Implementations

impl Debug for CountingSortError[src]

impl Display for CountingSortError[src]

impl Error for CountingSortError[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.