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§
source§impl Error
impl Error
sourcepub fn raise<S: AsRef<str>>(exc: S) -> Result<(), Error>
pub fn raise<S: AsRef<str>>(exc: S) -> Result<(), Error>
Raise an exception that has been registered using Callback.register_exception
with no
arguments
sourcepub fn raise_with_arg<S: AsRef<str>>(exc: S, arg: Value) -> Result<(), Error>
pub fn raise_with_arg<S: AsRef<str>>(exc: S, arg: Value) -> Result<(), Error>
Raise an exception that has been registered using Callback.register_exception
with an
argument
sourcepub fn out_of_memory() -> Result<(), Error>
pub fn out_of_memory() -> Result<(), Error>
Raise Out_of_memory