pub trait TriggerEvent: From<Self::Action> + PartialOrd {
type Action: TriggerAction + ConditionalSerde;
type Identifier: TriggerIdentifier + ConditionalSerde;
// Required methods
fn identifier(&self) -> Self::Identifier;
fn partial_cmp_progress(
&self,
other: &Self,
target_ordering: Ordering,
) -> Option<f64>;
}
Expand description
A trigger event.
Required Associated Types§
Sourcetype Action: TriggerAction + ConditionalSerde
type Action: TriggerAction + ConditionalSerde
The action type used by the trigger event.
Sourcetype Identifier: TriggerIdentifier + ConditionalSerde
type Identifier: TriggerIdentifier + ConditionalSerde
The identifier of a trigger event.
This type should be cheap to clone.
Required Methods§
Sourcefn identifier(&self) -> Self::Identifier
fn identifier(&self) -> Self::Identifier
Returns the identifier of this trigger event.
Sourcefn partial_cmp_progress(
&self,
other: &Self,
target_ordering: Ordering,
) -> Option<f64>
fn partial_cmp_progress( &self, other: &Self, target_ordering: Ordering, ) -> Option<f64>
Returns a number between 0.0 and 1.0 indicating how close the ordering of this and other is to the target ordering.
If the events are not ordered, then None
is returned.
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.