pub struct FailingExecutor;
Expand description
Dummy executor that fails whenever called.
Used in dummy contexts.
TODO: either remove, or move to vm-executor repo.
Trait Implementations§
Source§impl Executor for FailingExecutor
impl Executor for FailingExecutor
Source§fn set_vm_hooks_ptr(
&mut self,
_vm_hooks_ptr: *mut c_void,
) -> Result<(), ExecutorError>
fn set_vm_hooks_ptr( &mut self, _vm_hooks_ptr: *mut c_void, ) -> Result<(), ExecutorError>
Sets the data that can be hold by an instance context.
Source§fn set_opcode_cost(
&mut self,
_opcode_cost: &OpcodeCost,
) -> Result<(), ExecutorError>
fn set_opcode_cost( &mut self, _opcode_cost: &OpcodeCost, ) -> Result<(), ExecutorError>
Sets the opcode costs for the given executor.
Source§fn new_instance(
&self,
_wasm_bytes: &[u8],
_compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>
fn new_instance( &self, _wasm_bytes: &[u8], _compilation_options: &CompilationOptions, ) -> Result<Box<dyn Instance>, ExecutorError>
Creates a new VM executor instance.
Source§fn new_instance_from_cache(
&self,
_cache_bytes: &[u8],
_compilation_options: &CompilationOptions,
) -> Result<Box<dyn Instance>, ExecutorError>
fn new_instance_from_cache( &self, _cache_bytes: &[u8], _compilation_options: &CompilationOptions, ) -> Result<Box<dyn Instance>, ExecutorError>
Creates a new VM executor instance from cache.
Auto Trait Implementations§
impl Freeze for FailingExecutor
impl RefUnwindSafe for FailingExecutor
impl Send for FailingExecutor
impl Sync for FailingExecutor
impl Unpin for FailingExecutor
impl UnwindSafe for FailingExecutor
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