pub struct Servo<A: Automaton> { /* private fields */ }Expand description
Bridges an automaton to a graph parameter, stepping on every clock tick and sending control commands to the signal graph.
Implementations§
Source§impl<A: Automaton + 'static> Servo<A>
impl<A: Automaton + 'static> 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,
system: Arc<ActorSystem>,
graph_ref: ActorRef<CommandEnum>,
) -> Self
pub fn new( id: impl Into<String>, automaton: A, target_node: NodeId, target_param: impl Into<String>, mapping: ParameterMapping, min: f64, max: f64, system: Arc<ActorSystem>, graph_ref: ActorRef<CommandEnum>, ) -> Self
Creates a new Servo linking an automaton to a target parameter.
Sourcepub fn spawn(self, system: &ActorSystem) -> ActorRef<CommandEnum>
pub fn spawn(self, system: &ActorSystem) -> ActorRef<CommandEnum>
Spawns this servo as a detached tokio actor, returning its address.
The actor listens for ClockTick to step the automaton, and for
AutomatonCommand variants to handle enable/reset/UI value events.
Sourcepub fn with_table(self, table: Vec<ParamValue>) -> Self
pub fn with_table(self, table: Vec<ParamValue>) -> Self
Attaches a preset value table; raw automaton output selects table entries by index.
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