Struct spinoso_securerandom::RandomBytesError[][src]

pub struct RandomBytesError { /* fields omitted */ }

Error that indicates the underlying source of randomness failed to generate the requested random bytes.

This error is typically returned by the operating system.

Implementations

impl RandomBytesError[src]

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

Construct a new, default random bytes error.

Examples

const ERR: RandomBytesError = RandomBytesError::new();
assert_eq!(ERR.message(), "OS Error: Failed to generate random bytes");

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

Retrieve the exception message associated with this random bytes error.

Examples

let err = RandomBytesError::new();
assert_eq!(err.message(), "OS Error: Failed to generate random bytes");

Trait Implementations

impl Clone for RandomBytesError[src]

impl Copy for RandomBytesError[src]

impl Debug for RandomBytesError[src]

impl Display for RandomBytesError[src]

impl Eq for RandomBytesError[src]

impl Error for RandomBytesError[src]

impl From<RandomBytesError> for Error[src]

impl Hash for RandomBytesError[src]

impl Ord for RandomBytesError[src]

impl PartialEq<RandomBytesError> for RandomBytesError[src]

impl PartialOrd<RandomBytesError> for RandomBytesError[src]

impl StructuralEq for RandomBytesError[src]

impl StructuralPartialEq for RandomBytesError[src]

Auto Trait Implementations

impl RefUnwindSafe for RandomBytesError

impl Send for RandomBytesError

impl Sync for RandomBytesError

impl Unpin for RandomBytesError

impl UnwindSafe for RandomBytesError

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]