Skip to main content

TriggerSpec

Trait TriggerSpec 

Source
pub trait TriggerSpec: Sized {
    // Required method
    fn install_in_context(self, context: &mut Context);
}
Expand description

A complete installable trigger specification that can be passed to context.register_trigger. This is automatically implemented by the Trigger types returned by the emit_* methods on trigger criterion types. Client code should not implement this themselves.

Required Methods§

Source

fn install_in_context(self, context: &mut Context)

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.

Implementors§

Source§

impl<AC, DC, ActiveEv, InactiveEv, MakeActive, MakeInactive> TriggerSpec for TogglingTrigger<AC, DC, ActiveEv, InactiveEv, MakeActive, MakeInactive>
where AC: TriggerCriterion, DC: TriggerCriterion, ActiveEv: IxaEvent, InactiveEv: IxaEvent, MakeActive: Fn(AC::Observation) -> ActiveEv + 'static, MakeInactive: Fn(DC::Observation) -> InactiveEv + 'static,

Source§

impl<C, Ev, F> TriggerSpec for Trigger<C, Ev, F>
where C: TriggerCriterion, Ev: IxaEvent, F: Fn(C::Observation) -> Ev + 'static,