[][src]Struct artichoke::prelude::UncaughtThrowError

pub struct UncaughtThrowError { /* fields omitted */ }

Ruby UncaughtThrowError 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 UncaughtThrowError[src]

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

Construct a new, default UncaughtThrowError Ruby exception.

This constructor sets the exception message to UncaughtThrowError.

Examples

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

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

Return the message this Ruby exception was constructed with.

Examples

let exception = UncaughtThrowError::new();
assert_eq!(exception.message(), b"UncaughtThrowError");
let exception = UncaughtThrowError::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 = UncaughtThrowError::new();
assert_eq!(exception.name(), "UncaughtThrowError");

Trait Implementations

impl Clone for UncaughtThrowError[src]

impl Debug for UncaughtThrowError[src]

impl Default for UncaughtThrowError[src]

impl Display for UncaughtThrowError[src]

impl Eq for UncaughtThrowError[src]

impl Error for UncaughtThrowError[src]

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

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

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

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

impl From<String> for UncaughtThrowError[src]

impl From<UncaughtThrowError> for Error[src]

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

impl Hash for UncaughtThrowError[src]

impl Ord for UncaughtThrowError[src]

impl PartialEq<UncaughtThrowError> for UncaughtThrowError[src]

impl PartialOrd<UncaughtThrowError> for UncaughtThrowError[src]

impl RubyException for UncaughtThrowError[src]

impl RubyException for UncaughtThrowError[src]

impl StructuralEq for UncaughtThrowError[src]

impl StructuralPartialEq for UncaughtThrowError[src]

Auto Trait Implementations

impl RefUnwindSafe for UncaughtThrowError

impl Send for UncaughtThrowError

impl Sync for UncaughtThrowError

impl Unpin for UncaughtThrowError

impl UnwindSafe for UncaughtThrowError

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]