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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)