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§
Sourcefn started(&self, _abort: AbortHandle)
fn started(&self, _abort: AbortHandle)
A callback that is called whenever the server starts.
Sourcefn on_stderr_error(&self, _error: Error)
fn on_stderr_error(&self, _error: Error)
Reading from stderr failed.
Sourcefn 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 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
Sourcefn 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,
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§
impl Callbacks for DcgiCallbacks
Available on crate feature
webc_runner_rt_dcgi
only.