pub enum PermutationError {
ShuffleOutOfRange {
shuffle: u32,
max_shuffle: u32,
},
}
Expand description
The different types of errors that can arise from this crate
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).
Trait Implementations§
Source§impl Debug for PermutationError
impl Debug for PermutationError
Source§impl Display for PermutationError
impl Display for PermutationError
Source§impl Error for PermutationError
impl Error for PermutationError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PermutationError
impl RefUnwindSafe for PermutationError
impl Send for PermutationError
impl Sync for PermutationError
impl Unpin for PermutationError
impl UnwindSafe for PermutationError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more