pub struct Servo<A: Automaton> { /* private fields */ }Expand description
A servo bridges an automaton to a graph-node parameter.
Implementations§
Source§impl<A: Automaton> Servo<A>
impl<A: Automaton> Servo<A>
Sourcepub fn new(
id: impl Into<String>,
automaton: A,
target_node: NodeId,
target_param: impl Into<String>,
mapping: ParameterMapping,
min: f64,
max: f64,
) -> Self
pub fn new( id: impl Into<String>, automaton: A, target_node: NodeId, target_param: impl Into<String>, mapping: ParameterMapping, min: f64, max: f64, ) -> Self
Create a new servo.
Sourcepub fn update(&mut self, time: Time) -> Option<ParameterCommand>
pub fn update(&mut self, time: Time) -> Option<ParameterCommand>
Advance the servo and return a parameter command if the value changed.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable or disable this servo.
Trait Implementations§
Auto Trait Implementations§
impl<A> Freeze for Servo<A>
impl<A> !RefUnwindSafe for Servo<A>
impl<A> Send for Servo<A>
impl<A> Sync for Servo<A>
impl<A> Unpin for Servo<A>
impl<A> UnsafeUnpin for Servo<A>
impl<A> !UnwindSafe for Servo<A>
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