Enum rand_mt::RecoverRngError
source · #[non_exhaustive]pub enum RecoverRngError {
TooFewSamples(usize),
TooManySamples(usize),
}
Expand description
Error returned from fallible Mersenne Twister recovery constructors.
When the std
feature is enabled, this type implements std::error::Error
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooFewSamples(usize)
Attempted to recover an RNG with too many samples.
Recover constructors require an exact number of samples to ensure the recovered RNG matches the state of the RNG that supplied all of the samples.
TooManySamples(usize)
Attempted to recover an RNG with too few samples.
Too few samples leaves the internal state buffer partially uninitialized.
Recover constructors require an exact number of samples to ensure the recovered RNG matches the state of the RNG that supplied all of the samples.
Trait Implementations§
source§impl Clone for RecoverRngError
impl Clone for RecoverRngError
source§fn clone(&self) -> RecoverRngError
fn clone(&self) -> RecoverRngError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RecoverRngError
impl Debug for RecoverRngError
source§impl Display for RecoverRngError
impl Display for RecoverRngError
source§impl Error for RecoverRngError
impl Error for RecoverRngError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
source§impl Hash for RecoverRngError
impl Hash for RecoverRngError
source§impl PartialEq for RecoverRngError
impl PartialEq for RecoverRngError
source§fn eq(&self, other: &RecoverRngError) -> bool
fn eq(&self, other: &RecoverRngError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RecoverRngError
impl Eq for RecoverRngError
impl StructuralPartialEq for RecoverRngError
Auto Trait Implementations§
impl Freeze for RecoverRngError
impl RefUnwindSafe for RecoverRngError
impl Send for RecoverRngError
impl Sync for RecoverRngError
impl Unpin for RecoverRngError
impl UnwindSafe for RecoverRngError
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