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
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
)