pub struct DelayDoController {
pub state: DelayDoState,
pub delay_period: Duration,
/* private fields */
}Expand description
The delay-do controller.
Fields§
§state: DelayDoState§delay_period: DurationDelay period before triggering the action.
Implementations§
Source§impl DelayDoController
impl DelayDoController
pub fn new(delay_secs: f64) -> Self
Sourcepub fn step(&mut self, inputs: &DelayDoInputs) -> (DelayDoAction, DelayDoState)
pub fn step(&mut self, inputs: &DelayDoInputs) -> (DelayDoAction, DelayDoState)
Advance the state machine given current inputs. Returns the action to take (if any) and the new state.
Sourcepub fn delay_remaining(&self) -> Option<Duration>
pub fn delay_remaining(&self) -> Option<Duration>
SNL when ( delay( delayPeriod ) ) (delayDo.st:189) — how long a
runner must wait before re-evaluating, or None where no clause is
time-based and monitors are the only wake-up. wait is set on every
entry to waiting and cleared on every exit from it, so this answers
Some exactly in the one state that has a delay clause.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DelayDoController
impl RefUnwindSafe for DelayDoController
impl Send for DelayDoController
impl Sync for DelayDoController
impl Unpin for DelayDoController
impl UnsafeUnpin for DelayDoController
impl UnwindSafe for DelayDoController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more