pub struct InitializeError { /* private fields */ }
Expand description
Error that indicates a Random
random number generator failed to
initialize.
When initializing an Random
with a random seed, gathering entropy from
the host system can fail.
This error corresponds to the Ruby RuntimeError
Exception class.
§Examples
use spinoso_random::InitializeError;
let err = InitializeError::new();
assert_eq!(err.message(), "failed to get urandom");
Implementations§
Trait Implementations§
Source§impl Clone for InitializeError
impl Clone for InitializeError
Source§fn clone(&self) -> InitializeError
fn clone(&self) -> InitializeError
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 InitializeError
impl Debug for InitializeError
Source§impl Default for InitializeError
impl Default for InitializeError
Source§fn default() -> InitializeError
fn default() -> InitializeError
Returns the “default value” for a type. Read more
Source§impl Display for InitializeError
impl Display for InitializeError
Source§impl Error for InitializeError
impl Error for InitializeError
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<InitializeError> for Error
impl From<InitializeError> for Error
Source§fn from(err: InitializeError) -> Self
fn from(err: InitializeError) -> Self
Converts to this type from the input type.
Source§impl Hash for InitializeError
impl Hash for InitializeError
Source§impl Ord for InitializeError
impl Ord for InitializeError
Source§fn cmp(&self, other: &InitializeError) -> Ordering
fn cmp(&self, other: &InitializeError) -> 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 InitializeError
impl PartialEq for InitializeError
Source§impl PartialOrd for InitializeError
impl PartialOrd for InitializeError
impl Copy for InitializeError
impl Eq for InitializeError
impl StructuralPartialEq for InitializeError
Auto Trait Implementations§
impl Freeze for InitializeError
impl RefUnwindSafe for InitializeError
impl Send for InitializeError
impl Sync for InitializeError
impl Unpin for InitializeError
impl UnwindSafe for InitializeError
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