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