pub struct AnnouncedProducer { /* private fields */ }
Expand description
Announces tracks to consumers over the network.
Implementations§
Source§impl AnnouncedProducer
impl AnnouncedProducer
pub fn new() -> Self
Sourcepub fn announce<T: ToString>(&mut self, path: T) -> bool
pub fn announce<T: ToString>(&mut self, path: T) -> bool
Announce a track, returning true if it’s new.
Sourcepub fn unannounce(&mut self, path: &str) -> bool
pub fn unannounce(&mut self, path: &str) -> bool
Stop announcing a track, returning true if it was active.
Sourcepub fn live(&mut self) -> bool
pub fn live(&mut self) -> bool
Indicate that we’re caught up to the current state of the world.
Sourcepub fn subscribe(&self, filter: Filter) -> AnnouncedConsumer
pub fn subscribe(&self, filter: Filter) -> AnnouncedConsumer
Subscribe to all announced tracks matching the (wildcard) filter.
Trait Implementations§
Source§impl Clone for AnnouncedProducer
impl Clone for AnnouncedProducer
Source§fn clone(&self) -> AnnouncedProducer
fn clone(&self) -> AnnouncedProducer
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for AnnouncedProducer
impl Default for AnnouncedProducer
Source§fn default() -> AnnouncedProducer
fn default() -> AnnouncedProducer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AnnouncedProducer
impl RefUnwindSafe for AnnouncedProducer
impl Send for AnnouncedProducer
impl Sync for AnnouncedProducer
impl Unpin for AnnouncedProducer
impl UnwindSafe for AnnouncedProducer
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