event_trigger_action_system/triggers/
std_lib_implementations.rs

1use std::cmp::Ordering;
2
3use crate::triggers::TriggerIdentifier;
4use crate::{TriggerAction, TriggerEvent};
5
6impl TriggerAction for () {}
7
8impl TriggerIdentifier for () {}
9
10impl TriggerEvent for () {
11    type Action = ();
12    type Identifier = ();
13
14    fn identifier(&self) -> Self::Identifier {}
15
16    fn partial_cmp_progress(&self, _other: &Self, ordering: Ordering) -> Option<f64> {
17        Some(if ordering == Ordering::Equal {
18            1.0
19        } else {
20            0.0
21        })
22    }
23}