Skip to main content

AnyServo

Trait AnyServo 

Source
pub trait AnyServo: Send + Sync {
    // Required methods
    fn update(&mut self, time: Time) -> Option<ParameterCommand>;
    fn id(&self) -> &str;
    fn set_enabled(&mut self, enabled: bool);
}
Expand description

Trait for type-erased servo operations.

Required Methods§

Source

fn update(&mut self, time: Time) -> Option<ParameterCommand>

Update the servo and return a parameter command if the value changed.

Source

fn id(&self) -> &str

Return the servo’s unique identifier.

Source

fn set_enabled(&mut self, enabled: bool)

Enable or disable the servo.

Implementors§

Source§

impl<A: Automaton + 'static> AnyServo for Servo<A>