pub struct TalkbackControl { /* private fields */ }Expand description
The control side of a talkback bus.
Implementations§
Source§impl TalkbackControl
impl TalkbackControl
Sourcepub fn add(&self, id: &str) -> Option<SpeakerInput>
pub fn add(&self, id: &str) -> Option<SpeakerInput>
Add a speaker (or return the one with this id). None when the bus is full.
Sourcepub fn remove(&self, id: &str)
pub fn remove(&self, id: &str)
Remove a speaker (the audio side lets go of it at its next block).
Sourcepub fn set_all_muted(&self, muted: bool)
pub fn set_all_muted(&self, muted: bool)
Mute all talkback for yourself. The music is never touched.
Sourcepub fn stats(&self) -> Vec<SpeakerStats>
pub fn stats(&self) -> Vec<SpeakerStats>
Each speaker’s numbers.
Auto Trait Implementations§
impl !Freeze for TalkbackControl
impl Forget for TalkbackControl
impl Move for TalkbackControl
impl RefUnwindSafe for TalkbackControlwhere
Atomic<usize>: RefUnwindSafe,
ArrayQueue<Arc<Speaker>>: RefUnwindSafe,
Mutex<Vec<Arc<Speaker>>>: RefUnwindSafe,
Atomic<bool>: RefUnwindSafe,
impl Send for TalkbackControl
impl Sync for TalkbackControl
impl Unpin for TalkbackControl
impl UnsafeUnpin for TalkbackControlwhere
*const ArcInner<ArrayQueue<Arc<Speaker>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<ArrayQueue<Arc<Speaker>>>>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<Speaker>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
impl UnwindSafe for TalkbackControlwhere
Arc<ArrayQueue<Arc<Speaker>>>: UnwindSafe,
Mutex<Vec<Arc<Speaker>>>: UnwindSafe,
Arc<Atomic<bool>>: UnwindSafe,
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