pub struct JavaScriptInvocationStrategy;Expand description
Strategy that executes JavaScript module exports.
The entrypoint must refer to an exported function (module:export). The
runtime passes the invocation descriptor as the single argument, mirroring
the default Cloudflare Workers contract.
Trait Implementations§
Source§impl Default for JavaScriptInvocationStrategy
impl Default for JavaScriptInvocationStrategy
Source§fn default() -> JavaScriptInvocationStrategy
fn default() -> JavaScriptInvocationStrategy
Returns the “default value” for a type. Read more
Source§impl PyInvocationStrategy for JavaScriptInvocationStrategy
impl PyInvocationStrategy for JavaScriptInvocationStrategy
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 JavaScriptInvocationStrategy
impl RefUnwindSafe for JavaScriptInvocationStrategy
impl Send for JavaScriptInvocationStrategy
impl Sync for JavaScriptInvocationStrategy
impl Unpin for JavaScriptInvocationStrategy
impl UnwindSafe for JavaScriptInvocationStrategy
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