pub enum RuntimeError {
Message {
msg: &'static str,
},
}
Expand description
Enum, that represents a message passed to the program using the plugin when the function fails
Variants§
Message
Send a message, representing the runtime error, that occured while using a function.
§Example
fn call_function (
self: &mut Self,
_function_number: u64,
_args: Vec<&mut Box<dyn Any>>
) -> Result<Box<dyn Any>, RuntimeError> {
Err(RuntimeError::Message{
msg: "You can't call an empty freight"
})
}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnwindSafe for RuntimeError
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