pub struct DefaultInvocationStrategy;Expand description
Simple strategy that executes the entrypoint with no additional hooks.
For Python handlers it forwards descriptor arguments positionally. When the
guest language is JavaScript it invokes the exported function with a single
descriptor argument, matching the semantics of JavaScriptInvocationStrategy.
Trait Implementations§
Source§impl Default for DefaultInvocationStrategy
impl Default for DefaultInvocationStrategy
Source§fn default() -> DefaultInvocationStrategy
fn default() -> DefaultInvocationStrategy
Returns the “default value” for a type. Read more
Source§impl PyInvocationStrategy for DefaultInvocationStrategy
impl PyInvocationStrategy for DefaultInvocationStrategy
Source§fn invoke(&mut self, ctx: &mut InvocationContext<'_>) -> Result<StrategyResult>
fn invoke(&mut self, ctx: &mut InvocationContext<'_>) -> Result<StrategyResult>
Executes the user entrypoint and returns the raw execution output.
Source§fn pre_execute_js(&mut self, _ctx: &mut InvocationContext<'_>) -> Result<()>
fn pre_execute_js(&mut self, _ctx: &mut InvocationContext<'_>) -> Result<()>
Hook executed before any Python code runs, while JS context is active.
Source§fn pre_execute_py(&mut self, _ctx: &mut InvocationContext<'_>) -> Result<()>
fn pre_execute_py(&mut self, _ctx: &mut InvocationContext<'_>) -> Result<()>
Hook executed inside the Python interpreter before the user entrypoint.
Source§fn post_execute_py(
&mut self,
_ctx: &mut InvocationContext<'_>,
_result: &StrategyResult,
) -> Result<()>
fn post_execute_py( &mut self, _ctx: &mut InvocationContext<'_>, _result: &StrategyResult, ) -> Result<()>
Hook executed after the entrypoint inside Python.
Source§fn post_execute_js(
&mut self,
_ctx: &mut InvocationContext<'_>,
_result: &StrategyResult,
) -> Result<()>
fn post_execute_js( &mut self, _ctx: &mut InvocationContext<'_>, _result: &StrategyResult, ) -> Result<()>
Hook executed after the entrypoint inside JS.
Auto Trait Implementations§
impl Freeze for DefaultInvocationStrategy
impl RefUnwindSafe for DefaultInvocationStrategy
impl Send for DefaultInvocationStrategy
impl Sync for DefaultInvocationStrategy
impl Unpin for DefaultInvocationStrategy
impl UnwindSafe for DefaultInvocationStrategy
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