Struct spinoso_securerandom::DomainError[][src]

pub struct DomainError { /* fields omitted */ }

Error that indicates the given maximum value is not finite and cannot be used to bound a domain for generating random numbers.

This error is returned by random_number.


impl DomainError[src]

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

Construct a new, default domain error.


const ERR: DomainError = DomainError::new();
assert_eq!(ERR.message(), "Numerical argument out of domain");

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

Retrieve the exception message associated with this domain error.


let err = DomainError::new();
assert_eq!(err.message(), "Numerical argument out of domain");

Trait Implementations

impl Clone for DomainError[src]

impl Copy for DomainError[src]

impl Debug for DomainError[src]

impl Display for DomainError[src]

impl Eq for DomainError[src]

impl Error for DomainError[src]

impl Hash for DomainError[src]

impl Ord for DomainError[src]

impl PartialEq<DomainError> for DomainError[src]

impl PartialOrd<DomainError> for DomainError[src]

impl StructuralEq for DomainError[src]

impl StructuralPartialEq for DomainError[src]

Auto Trait Implementations

impl RefUnwindSafe for DomainError

impl Send for DomainError

impl Sync for DomainError

impl Unpin for DomainError

impl UnwindSafe for DomainError

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