pub enum HookError {
CompileError(String),
InstantiationError(String),
FuelExhausted,
Trap(String),
InvalidResult(String),
AutoDisabled {
name: String,
consecutive_traps: u32,
},
InvalidHookPoint(String),
IoError(Error),
AbiVersionMismatch {
hook_name: String,
expected: i32,
found: Option<i32>,
},
}Expand description
Errors that can occur in the hook system.
Variants§
CompileError(String)
WASM module failed to compile.
InstantiationError(String)
WASM module failed to instantiate.
FuelExhausted
WASM execution ran out of fuel.
Trap(String)
WASM execution trapped (panic, out-of-bounds, etc.).
InvalidResult(String)
Hook returned invalid result data.
AutoDisabled
Hook was auto-disabled after too many consecutive failures.
InvalidHookPoint(String)
Hook point not found or invalid.
IoError(Error)
I/O error loading a WASM module.
AbiVersionMismatch
WASM module was compiled against an incompatible ABI version.
Trait Implementations§
Source§impl Error for HookError
impl Error for HookError
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 HookError
impl !RefUnwindSafe for HookError
impl Send for HookError
impl Sync for HookError
impl Unpin for HookError
impl UnsafeUnpin for HookError
impl !UnwindSafe for HookError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more