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
sourceimpl 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
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more