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 unannounce(&mut self, path: &Path) -> bool
pub fn unannounce(&mut self, path: &Path) -> bool
Stop announcing a track, returning true if it was active.
pub fn is_active(&self, path: &Path) -> bool
Sourcepub fn subscribe(&self) -> AnnouncedConsumer
pub fn subscribe(&self) -> AnnouncedConsumer
Subscribe to all announced tracks, including those already active.
Sourcepub fn subscribe_prefix(&self, prefix: Path) -> AnnouncedConsumer
pub fn subscribe_prefix(&self, prefix: Path) -> AnnouncedConsumer
Subscribe to all announced tracks based on a prefix, including those already active.
pub async fn closed(&self)
Trait Implementations§
Source§impl Clone for AnnouncedProducer
impl Clone for AnnouncedProducer
Source§fn clone(&self) -> AnnouncedProducer
fn clone(&self) -> AnnouncedProducer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
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