behavior_actors/time/event.rs
1//! Structural event layer shared by timer-based behavior compositions.
2
3use behavior::{Actions, Behavior};
4
5/// A timer template owns one elapsed-timer lane in front of the complete event
6/// algebra of the behavior it wraps.
7pub type TimedEvent<E> = behavior::EventLayer<crate::TimerElapsed, E>;
8
9/// Infallible reaction that may use every action capability of the wrapped behavior.
10pub type TimedReaction<B> = fn(
11 &mut B,
12) -> Actions<
13 behavior::BehaviorAddr<B>,
14 <B as Behavior>::Ph,
15 <B as Behavior>::Sends,
16 <B as Behavior>::Birth,
17>;