[][src]Struct artichoke::prelude::NoMethodError

pub struct NoMethodError { /* fields omitted */ }

Ruby NoMethodError error type.

Descendants of class Exception are used to communicate between Kernel#raise and rescue statements in begin ... end blocks. Exception objects carry information about the exception – its type (the exception's class name), an optional descriptive string, and optional traceback information. Exception subclasses may add additional information like NameError#name.

Implementations

impl NoMethodError[src]

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

Construct a new, default NoMethodError Ruby exception.

This constructor sets the exception message to NoMethodError.

Examples

let exception = NoMethodError::new();
assert_eq!(exception.message(), b"NoMethodError");

#[must_use]pub fn message(&self) -> &[u8][src]

Return the message this Ruby exception was constructed with.

Examples

let exception = NoMethodError::new();
assert_eq!(exception.message(), b"NoMethodError");
let exception = NoMethodError::from("something went wrong");
assert_eq!(exception.message(), b"something went wrong");

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

Return this Ruby exception's class name.

Examples

let exception = NoMethodError::new();
assert_eq!(exception.name(), "NoMethodError");

Trait Implementations

impl Clone for NoMethodError[src]

impl Debug for NoMethodError[src]

impl Default for NoMethodError[src]

impl Display for NoMethodError[src]

impl Eq for NoMethodError[src]

impl Error for NoMethodError[src]

impl From<&'static [u8]> for NoMethodError[src]

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

impl From<Cow<'static, [u8]>> for NoMethodError[src]

impl From<Cow<'static, str>> for NoMethodError[src]

impl From<NoMethodError> for Error[src]

impl From<String> for NoMethodError[src]

impl From<Vec<u8, Global>> for NoMethodError[src]

impl Hash for NoMethodError[src]

impl Ord for NoMethodError[src]

impl PartialEq<NoMethodError> for NoMethodError[src]

impl PartialOrd<NoMethodError> for NoMethodError[src]

impl RubyException for NoMethodError[src]

impl RubyException for NoMethodError[src]

impl StructuralEq for NoMethodError[src]

impl StructuralPartialEq for NoMethodError[src]

Auto Trait Implementations

impl RefUnwindSafe for NoMethodError

impl Send for NoMethodError

impl Sync for NoMethodError

impl Unpin for NoMethodError

impl UnwindSafe for NoMethodError

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]