Enum ocaml::Error

source ·
pub enum Error {
    NotCallable,
    NotDoubleArray,
    Message(&'static str),
    Error(Box<dyn Error>),
    Caml(CamlError),
}
Expand description

Error returned by ocaml-rs functions

Variants§

§

NotCallable

A value cannot be called using callback functions

§

NotDoubleArray

Array is not a double array

§

Message(&'static str)

Error message

§

Error(Box<dyn Error>)

General error

§

Caml(CamlError)

OCaml exceptions

Implementations§

Re-raise an existing exception value

Raise an exception that has been registered using Callback.register_exception with no arguments

Raise an exception that has been registered using Callback.register_exception with an argument

Raise Not_found

Raise Out_of_memory

Raise Failure

Raise Invalid_argument

Get named error registered using Callback.register_exception

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts to this type from the input type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.