[][src]Struct spinoso_random::UrandomError

pub struct UrandomError { /* fields omitted */ }

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

let err = UrandomError::new();
assert_eq!(err.message(), "failed to get urandom");

Implementations

impl UrandomError[src]

#[must_use]pub const fn new() -> Self[src]

Construct a new, default urandom error.

Examples

const ERR: UrandomError = UrandomError::new();
assert_eq!(ERR.message(), "failed to get urandom");

#[must_use]pub const fn message(self) -> &'static str[src]

Retrieve the exception message associated with this urandom error.

Examples

let err = UrandomError::new();
assert_eq!(err.message(), "failed to get urandom");

Trait Implementations

impl Clone for UrandomError[src]

impl Copy for UrandomError[src]

impl Debug for UrandomError[src]

impl Default for UrandomError[src]

impl Display for UrandomError[src]

impl Eq for UrandomError[src]

impl Error for UrandomError[src]

impl From<UrandomError> for Error[src]

impl Hash for UrandomError[src]

impl Ord for UrandomError[src]

impl PartialEq<UrandomError> for UrandomError[src]

impl PartialOrd<UrandomError> for UrandomError[src]

impl StructuralEq for UrandomError[src]

impl StructuralPartialEq for UrandomError[src]

Auto Trait Implementations

impl RefUnwindSafe for UrandomError[src]

impl Send for UrandomError[src]

impl Sync for UrandomError[src]

impl Unpin for UrandomError[src]

impl UnwindSafe for UrandomError[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]