pub struct NewSeedError { /* private fields */ }
Expand description
Error that indicates the system source of cryptographically secure randomness failed to read sufficient bytes to create a new seed.
This can occur if the source is unknown or lacks sufficient entropy.
This error is returned by new_seed
. See its documentation for more
details.
This error corresponds to the Ruby RuntimeError
Exception class.
§Examples
use spinoso_random::NewSeedError;
let err = NewSeedError::new();
assert_eq!(err.message(), "failed to get urandom");
Implementations§
Trait Implementations§
Source§impl Clone for NewSeedError
impl Clone for NewSeedError
Source§fn clone(&self) -> NewSeedError
fn clone(&self) -> NewSeedError
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 NewSeedError
impl Debug for NewSeedError
Source§impl Default for NewSeedError
impl Default for NewSeedError
Source§fn default() -> NewSeedError
fn default() -> NewSeedError
Returns the “default value” for a type. Read more
Source§impl Display for NewSeedError
impl Display for NewSeedError
Source§impl Error for NewSeedError
impl Error for NewSeedError
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 From<NewSeedError> for Error
impl From<NewSeedError> for Error
Source§fn from(err: NewSeedError) -> Self
fn from(err: NewSeedError) -> Self
Converts to this type from the input type.
Source§impl Hash for NewSeedError
impl Hash for NewSeedError
Source§impl Ord for NewSeedError
impl Ord for NewSeedError
Source§fn cmp(&self, other: &NewSeedError) -> Ordering
fn cmp(&self, other: &NewSeedError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for NewSeedError
impl PartialEq for NewSeedError
Source§impl PartialOrd for NewSeedError
impl PartialOrd for NewSeedError
impl Copy for NewSeedError
impl Eq for NewSeedError
impl StructuralPartialEq for NewSeedError
Auto Trait Implementations§
impl Freeze for NewSeedError
impl RefUnwindSafe for NewSeedError
impl Send for NewSeedError
impl Sync for NewSeedError
impl Unpin for NewSeedError
impl UnwindSafe for NewSeedError
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