pub struct BroadcastProducer { /* private fields */ }Expand description
Receive broadcast/track requests and return if we can fulfill them.
Implementations§
Source§impl BroadcastProducer
impl BroadcastProducer
pub fn new() -> Self
pub async fn request(&mut self) -> Option<TrackProducer>
pub fn create(&mut self, track: Track) -> TrackProducer
Sourcepub fn insert(&mut self, track: TrackConsumer) -> bool
pub fn insert(&mut self, track: TrackConsumer) -> bool
Insert a track into the lookup, returning true if it was unique.
pub fn consume(&self) -> BroadcastConsumer
pub fn finish(&mut self)
Sourcepub fn unused(&self) -> impl Future<Output = ()>
pub fn unused(&self) -> impl Future<Output = ()>
Block until there are no more consumers.
A new consumer can be created by calling Self::consume and this will block again.
pub fn is_clone(&self, other: &Self) -> bool
Trait Implementations§
Source§impl Clone for BroadcastProducer
impl Clone for BroadcastProducer
Source§impl Default for BroadcastProducer
impl Default for BroadcastProducer
Auto Trait Implementations§
impl Freeze for BroadcastProducer
impl RefUnwindSafe for BroadcastProducer
impl Send for BroadcastProducer
impl Sync for BroadcastProducer
impl !Unpin for BroadcastProducer
impl UnwindSafe for BroadcastProducer
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