Struct LiveReactor
pub struct LiveReactor { /* private fields */ }Expand description
Ordered collection of reactor rules.
Implementations§
§impl LiveReactor
impl LiveReactor
pub fn new() -> LiveReactor
pub fn new() -> LiveReactor
Create an empty reactor.
pub fn voice_defaults() -> LiveReactor
pub fn voice_defaults() -> LiveReactor
Create a reactor with the default voice-flow rules.
pub fn add_rule(&mut self, rule: impl ReactorRule + 'static)
pub fn add_rule(&mut self, rule: impl ReactorRule + 'static)
Add a rule to the end of the ordered rule list.
pub fn react(&self, event: &ReactorEvent) -> Vec<Reaction>
pub fn react(&self, event: &ReactorEvent) -> Vec<Reaction>
Run all rules against an event and collect reactions in rule order.
pub fn voice_state(&self) -> VoiceRuntimeState
pub fn voice_state(&self) -> VoiceRuntimeState
Return a snapshot of the current voice runtime state.
Trait Implementations§
§impl Default for LiveReactor
impl Default for LiveReactor
§fn default() -> LiveReactor
fn default() -> LiveReactor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for LiveReactor
impl !RefUnwindSafe for LiveReactor
impl Send for LiveReactor
impl Sync for LiveReactor
impl Unpin for LiveReactor
impl !UnwindSafe for LiveReactor
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