pub trait Module: Send {
// Required methods
fn id(&self) -> &str;
fn stop(&mut self);
// Provided methods
fn handle(&self) -> Option<ActorRef<CommandEnum>> { ... }
fn set_enabled(&mut self, _enabled: bool) { ... }
}Expand description
Unified interface for sensor and control modules (MIDI hubs, OSC servers, etc.).
Required Methods§
Provided Methods§
Sourcefn handle(&self) -> Option<ActorRef<CommandEnum>>
fn handle(&self) -> Option<ActorRef<CommandEnum>>
Returns the actor handle if this module has a control actor, None otherwise.
Sourcefn set_enabled(&mut self, _enabled: bool)
fn set_enabled(&mut self, _enabled: bool)
Enables or disables the module.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".