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.


impl RandomBytesError[src]

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

Construct a new, default random bytes error.


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.


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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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