Struct spinoso_math::NotImplementedError[][src]

pub struct NotImplementedError(_);

Error that indicates a Math module function is not implemented.

Some math functions are not available in the Rust core library and require this crate to be built with extra compile-time features to enable additional dependencies.

Not implemented errors have an associated message.

This error corresponds to the Ruby NotImplementedError Exception class.

Examples

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

let err = NotImplementedError::with_message(
    "Artichoke was not built with Math::erf support"
);
assert_eq!(err.message(), "Artichoke was not built with Math::erf support");

Implementations

impl NotImplementedError[src]

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

Construct a new, default not implemented error.

Examples

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

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

Construct a new, not implemented error with a message.

Examples

const ERR: NotImplementedError = NotImplementedError::with_message(
    "Artichoke was not built with Math::erf support"
);
assert_eq!(ERR.message(), "Artichoke was not built with Math::erf support");

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

Retrieve the exception message associated with this not implemented error.

Examples

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

let err = NotImplementedError::with_message(
    "Artichoke was not built with Math::erf support"
);
assert_eq!(err.message(), "Artichoke was not built with Math::erf support");

Trait Implementations

impl Clone for NotImplementedError[src]

impl Copy for NotImplementedError[src]

impl Debug for NotImplementedError[src]

impl Default for NotImplementedError[src]

impl Display for NotImplementedError[src]

impl Eq for NotImplementedError[src]

impl Error for NotImplementedError[src]

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

impl From<NotImplementedError> for Error[src]

impl Hash for NotImplementedError[src]

impl Ord for NotImplementedError[src]

impl PartialEq<NotImplementedError> for NotImplementedError[src]

impl PartialOrd<NotImplementedError> for NotImplementedError[src]

impl StructuralEq for NotImplementedError[src]

impl StructuralPartialEq for NotImplementedError[src]

Auto Trait Implementations

impl RefUnwindSafe for NotImplementedError

impl Send for NotImplementedError

impl Sync for NotImplementedError

impl Unpin for NotImplementedError

impl UnwindSafe for NotImplementedError

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.