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