[][src]Struct spinoso_random::NewSeedError

pub struct NewSeedError { /* fields omitted */ }

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

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

Implementations

impl NewSeedError[src]

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

Construct a new, default new seed error.

Examples

const ERR: NewSeedError = NewSeedError::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 new seed error.

Examples

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

Trait Implementations

impl Clone for NewSeedError[src]

impl Copy for NewSeedError[src]

impl Debug for NewSeedError[src]

impl Default for NewSeedError[src]

impl Display for NewSeedError[src]

impl Eq for NewSeedError[src]

impl Error for NewSeedError[src]

impl From<NewSeedError> for Error[src]

impl Hash for NewSeedError[src]

impl Ord for NewSeedError[src]

impl PartialEq<NewSeedError> for NewSeedError[src]

impl PartialOrd<NewSeedError> for NewSeedError[src]

impl StructuralEq for NewSeedError[src]

impl StructuralPartialEq for NewSeedError[src]

Auto Trait Implementations

impl RefUnwindSafe for NewSeedError[src]

impl Send for NewSeedError[src]

impl Sync for NewSeedError[src]

impl Unpin for NewSeedError[src]

impl UnwindSafe for NewSeedError[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]