Trait moa_core::Steppable

source ·
pub trait Steppable {
    // Required method
    fn step(&mut self, system: &System) -> Result<Duration, Error>;

    // Provided method
    fn on_error(&mut self, _system: &System) { ... }
}
Expand description

A device that can change state over time. The step() method will be called by the containing System when the system clock advances. If an error occurs with any device, the on_error() method will be called to display any state information that might be helpful for debugging.

Required Methods§

source

fn step(&mut self, system: &System) -> Result<Duration, Error>

Provided Methods§

source

fn on_error(&mut self, _system: &System)

Implementors§