wasmer_wasix::runners::wcgi

Trait Callbacks

Source
pub trait Callbacks:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn started(&self, _abort: AbortHandle) { ... }
    fn on_stderr(&self, _stderr: &[u8]) { ... }
    fn on_stderr_error(&self, _error: Error) { ... }
    fn recycle_env<'life0, 'async_trait>(
        &'life0 self,
        conf: RecycleEnvConfig,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn create_env<'life0, 'async_trait>(
        &'life0 self,
        conf: CreateEnvConfig,
    ) -> Pin<Box<dyn Future<Output = Result<CreateEnvResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Available on crate feature webc_runner_rt_wcgi only.
Expand description

Callbacks that are triggered at various points in the lifecycle of a runner and any WebAssembly instances it may start.

Provided Methods§

Source

fn started(&self, _abort: AbortHandle)

A callback that is called whenever the server starts.

Source

fn on_stderr(&self, _stderr: &[u8])

Data was written to stderr by an instance.

Source

fn on_stderr_error(&self, _error: Error)

Reading from stderr failed.

Source

fn recycle_env<'life0, 'async_trait>( &'life0 self, conf: RecycleEnvConfig, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Recycle the WASI environment

Source

fn create_env<'life0, 'async_trait>( &'life0 self, conf: CreateEnvConfig, ) -> Pin<Box<dyn Future<Output = Result<CreateEnvResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create the WASI environment

Implementors§

Source§

impl Callbacks for DcgiCallbacks

Available on crate feature webc_runner_rt_dcgi only.
Source§

impl Callbacks for NoOpWcgiCallbacks