Trait wasmer_wasix::runners::wcgi::Callbacks

source ·
pub trait Callbacks: Debug + 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 { ... }
}
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§