pub enum RandomBitsError {
RandCore(Error),
BitsPrecisionMismatch {
bits_precision: u32,
integer_bits: u32,
},
BitLengthTooLarge {
bit_length: u32,
bits_precision: u32,
},
}
Available on crate feature
rand_core
only.Expand description
Possible errors of the methods in RandomBits
trait.
Variants§
RandCore(Error)
An error of the internal RNG library.
BitsPrecisionMismatch
The requested bits_precision
does not match the size of the integer
corresponding to the type (in the cases where this is set in compile time).
Fields
BitLengthTooLarge
The requested bit_length
is larger than bits_precision
.
Trait Implementations§
Source§impl Debug for RandomBitsError
impl Debug for RandomBitsError
Source§impl Display for RandomBitsError
impl Display for RandomBitsError
Source§impl Error for RandomBitsError
impl Error for RandomBitsError
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 RandomBitsError
impl RefUnwindSafe for RandomBitsError
impl Send for RandomBitsError
impl Sync for RandomBitsError
impl Unpin for RandomBitsError
impl UnwindSafe for RandomBitsError
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