pub trait ActorState: Clone {
    type Event: Event;
    type Outcome: Outcome;

    fn apply_event(self, e: Self::Event, time: Instant) -> Self;
    fn get_outcome(&self, time: Instant) -> Self::Outcome;
    fn get_next_wake(&self, now: Instant) -> Option<Instant>;
}
Expand description

Contains and calculates the intenal state of the actor.

Required Associated Types

Required Methods

Returns the new internal state after the event gets processed.

Returns the observable state of the actor given this internal state.

Returns the next wake up to schedule if one is needed. This may be called at any time, so should always return the correct value.

Implementors