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.
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