pub enum Trap {
DowncastError(&'static str),
ScriptOutOfBounds,
MissingGlobal(String),
Runtime(String),
}Expand description
An error which may occur during running a function
Variants§
DowncastError(&'static str)
The type of the global differs than the requested type
ScriptOutOfBounds
The script could not execute the given function
MissingGlobal(String)
A variable is missing
Runtime(String)
Another custom runtime error
Implementations§
Trait Implementations§
Source§impl Error for Trap
impl Error for Trap
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Trap
impl RefUnwindSafe for Trap
impl Send for Trap
impl Sync for Trap
impl Unpin for Trap
impl UnwindSafe for Trap
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