[][src]Struct artichoke_backend::extn::stdlib::securerandom::ArgumentError

pub struct ArgumentError(_);

Error that indicates an argument parsing or value logic error occurred.

Argument errors have an associated message.

This error corresponds to the Ruby ArgumentError Exception class.

Examples

let err = ArgumentError::new();
assert_eq!(err.message(), "ArgumentError");

let err = ArgumentError::with_message("negative string size (or size too big)");
assert_eq!(err.message(), "negative string size (or size too big)");

Implementations

impl ArgumentError[src]

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

Construct a new, default argument error.

Examples

const ERR: ArgumentError = ArgumentError::new();
assert_eq!(ERR.message(), "ArgumentError");

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

Construct a new, argument error with a message.

Examples

const ERR: ArgumentError = ArgumentError::with_message("negative string size (or size too big)");
assert_eq!(ERR.message(), "negative string size (or size too big)");

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

Retrieve the exception message associated with this argument error.

Examples

let err = ArgumentError::new();
assert_eq!(err.message(), "ArgumentError");

let err = ArgumentError::with_message("negative string size (or size too big)");
assert_eq!(err.message(), "negative string size (or size too big)");

Trait Implementations

impl Clone for ArgumentError[src]

impl Copy for ArgumentError[src]

impl Debug for ArgumentError[src]

impl Default for ArgumentError[src]

impl Display for ArgumentError[src]

impl Eq for ArgumentError[src]

impl Error for ArgumentError[src]

impl From<&'static str> for ArgumentError[src]

impl From<ArgumentError> for Error[src]

impl From<ArgumentError> for Error[src]

impl Hash for ArgumentError[src]

impl Ord for ArgumentError[src]

impl PartialEq<ArgumentError> for ArgumentError[src]

impl PartialOrd<ArgumentError> for ArgumentError[src]

impl StructuralEq for ArgumentError[src]

impl StructuralPartialEq for ArgumentError[src]

Auto Trait Implementations

impl RefUnwindSafe for ArgumentError[src]

impl Send for ArgumentError[src]

impl Sync for ArgumentError[src]

impl Unpin for ArgumentError[src]

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