pub trait Trigger<F: RuntimeFactors>: Sized + Send {
type CliArgs: Args;
type InstanceState: Send + 'static;
const TYPE: &'static str;
// Required methods
fn new(cli_args: Self::CliArgs, app: &App) -> Result<Self>;
fn run(
self,
trigger_app: TriggerApp<Self, F>,
) -> impl Future<Output = Result<()>> + Send;
// Provided methods
fn add_to_linker(
&mut self,
linker: &mut Linker<InstanceState<<F as RuntimeFactors>::InstanceState, <Self as Trigger<F>>::InstanceState>>,
) -> Result<()> { ... }
fn supported_host_requirements() -> Vec<&'static str> { ... }
}
Expand description
A trigger for a Spin runtime.
Required Associated Constants§
Required Associated Types§
Sourcetype InstanceState: Send + 'static
type InstanceState: Send + 'static
The instance state for this trigger.
Required Methods§
Provided Methods§
Sourcefn add_to_linker(
&mut self,
linker: &mut Linker<InstanceState<<F as RuntimeFactors>::InstanceState, <Self as Trigger<F>>::InstanceState>>,
) -> Result<()>
fn add_to_linker( &mut self, linker: &mut Linker<InstanceState<<F as RuntimeFactors>::InstanceState, <Self as Trigger<F>>::InstanceState>>, ) -> Result<()>
Update the Linker
for this trigger.
Sourcefn supported_host_requirements() -> Vec<&'static str>
fn supported_host_requirements() -> Vec<&'static str>
Returns a list of host requirements supported by this trigger specifically.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.