#[non_exhaustive]pub enum RecoverRngError {
TooFewSamples(usize),
TooManySamples(usize),
}
Expand description
Error returned from fallible Mersenne Twister recovery constructors.
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)>
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()
Source§impl Hash for RecoverRngError
impl Hash for RecoverRngError
Source§impl PartialEq for RecoverRngError
impl PartialEq for RecoverRngError
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