pub enum NativeError {
FunctionNotFound(String),
WrongParameterCount(usize),
WrongParameterType,
IndexOutOfBounds(usize),
IndexNegative,
CustomError(String),
}Expand description
Error types created by super::NativeFunction calls.
NativeError::CustomError can be used for general purpose errors.
Variants§
FunctionNotFound(String)
WrongParameterCount(usize)
WrongParameterType
IndexOutOfBounds(usize)
IndexNegative
CustomError(String)
Trait Implementations§
Source§impl Debug for NativeError
impl Debug for NativeError
Source§impl Display for NativeError
impl Display for NativeError
Source§impl Error for NativeError
impl Error for NativeError
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()
Source§impl From<&str> for NativeError
impl From<&str> for NativeError
Source§impl From<String> for NativeError
impl From<String> for NativeError
Source§impl PartialEq for NativeError
impl PartialEq for NativeError
impl StructuralPartialEq for NativeError
Auto Trait Implementations§
impl Freeze for NativeError
impl RefUnwindSafe for NativeError
impl Send for NativeError
impl Sync for NativeError
impl Unpin for NativeError
impl UnwindSafe for NativeError
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