pub struct ScriptExecutor { /* private fields */ }Implementations§
Source§impl ScriptExecutor
impl ScriptExecutor
Sourcepub fn try_new() -> Result<Self, HookError>
pub fn try_new() -> Result<Self, HookError>
Builds an executor on the baseline engine.
Fallible because engine construction is: wasmtime validates the
configuration and rejects unsupported combinations. There is no
infallible new/Default for the same reason — a constructor that
cannot report that failure can only paper over it.
pub fn with_engine(engine: Engine) -> Self
Sourcepub fn with_epoch_deadline_ticks(self, ticks: u64) -> Self
pub fn with_epoch_deadline_ticks(self, ticks: u64) -> Self
Overrides the per-execution wall-clock budget.
Production uses DEFAULT_EPOCH_DEADLINE_TICKS; a caller that runs
under coverage instrumentation, a debugger, or a loaded CI node raises
it so a slow-but-correct script is not cut off mid-execution.
Sourcepub fn linked_imports(&self) -> Result<Vec<(String, String)>, HookError>
pub fn linked_imports(&self) -> Result<Vec<(String, String)>, HookError>
The (module, name) of every host function a script can import.
pub fn execute( &self, bytecode: &[u8], input: &[u8], output_size: Option<u32>, ) -> Result<Vec<ParsedEntity>, HookError>
Auto Trait Implementations§
impl !RefUnwindSafe for ScriptExecutor
impl !UnwindSafe for ScriptExecutor
impl Freeze for ScriptExecutor
impl Send for ScriptExecutor
impl Sync for ScriptExecutor
impl Unpin for ScriptExecutor
impl UnsafeUnpin for ScriptExecutor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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