pub struct LiveReactor { /* private fields */ }Expand description
Ordered collection of reactor rules.
Implementations§
Source§impl LiveReactor
impl LiveReactor
Sourcepub fn voice_defaults() -> Self
pub fn voice_defaults() -> Self
Create a reactor with the default voice-flow rules.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn voice_state(&self) -> VoiceRuntimeState
pub fn voice_state(&self) -> VoiceRuntimeState
Return a snapshot of the current voice runtime state.
Trait Implementations§
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