[][src]Enum ducc::ErrorKind

pub enum ErrorKind {
    ToJsConversionError {
        from: &'static str,
        to: &'static str,
    },
    FromJsConversionError {
        from: &'static str,
        to: &'static str,
    },
    RuntimeError {
        code: RuntimeErrorCode,
        name: String,
    },
    RecursiveMutCallback,
    ExternalError(Box<dyn RuntimeError + 'static>),
    NotAFunction,
}

Variants

ToJsConversionError

A Rust value could not be converted to a JavaScript value.

Fields of ToJsConversionError

from: &'static str

Name of the Rust type that could not be converted.

to: &'static str

Name of the JavaScript type that could not be created.

FromJsConversionError

A JavaScript value could not be converted to the expected Rust type.

Fields of FromJsConversionError

from: &'static str

Name of the JavaScript type that could not be converted.

to: &'static str

Name of the Rust type that could not be created.

RuntimeError

An error that occurred within the scripting environment.

Fields of RuntimeError

code: RuntimeErrorCode

A code representing what type of error occurred.

name: String

A string representation of the type of error.

RecursiveMutCallback

A mutable callback has triggered JavaScript code that has called the same mutable callback again.

This is an error because a mutable callback can only be borrowed mutably once.

ExternalError(Box<dyn RuntimeError + 'static>)

A custom error that occurs during runtime.

This can be used for returning user-defined errors from callbacks.

NotAFunction

An error specifying the variable that was called as a function was not a function.

Trait Implementations

impl Debug for ErrorKind[src]

impl From<ErrorKind> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for ErrorKind

impl !Send for ErrorKind

impl !Sync for ErrorKind

impl Unpin for ErrorKind

impl !UnwindSafe for ErrorKind

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