pub struct Consumer<E: CatalogExt = ()> { /* private fields */ }Expand description
A catalog stream sourced from a [moq_net::broadcast::Consumer].
Both encodings emit Catalog<E>, extension included:
MSF carries the same root sections as the hang catalog. Wrap with
Select to narrow the rendition set before handing the
stream to an exporter.
Reaching EOF releases the subscription and decoder while retaining its format.
Drive it through the Stream trait; its encoding and ended state stay private.
ⓘ
use moq_mux::catalog::{CatalogFormat, Consumer};
let consumer = Consumer::<()>::Closed(CatalogFormat::Hang);Implementations§
Source§impl<E: CatalogExt> Consumer<E>
impl<E: CatalogExt> Consumer<E>
Sourcepub async fn new(
broadcast: &Consumer,
format: CatalogFormat,
) -> Result<Self, Error>
pub async fn new( broadcast: &Consumer, format: CatalogFormat, ) -> Result<Self, Error>
Subscribe to the catalog track advertised by format.
Trait Implementations§
Source§impl<E: CatalogExt> Stream for Consumer<E>
impl<E: CatalogExt> Stream for Consumer<E>
Source§fn poll_next(
&mut self,
waiter: &Waiter,
) -> Poll<Result<Option<Timed<Catalog<E>>>>>
fn poll_next( &mut self, waiter: &Waiter, ) -> Poll<Result<Option<Timed<Catalog<E>>>>>
Poll for the next catalog snapshot and the timestamp it takes effect at on the broadcast’s
media timeline, or
None once the stream ends. A scale-less catalog track has no timeline:
there the timestamp is the group key (see moq_json::Timed), so apply it on arrival.Auto Trait Implementations§
impl<E = ()> !Freeze for Consumer<E>
impl<E = ()> !RefUnwindSafe for Consumer<E>
impl<E = ()> !Sync for Consumer<E>
impl<E> Send for Consumer<E>
impl<E> Unpin for Consumer<E>
impl<E> UnsafeUnpin for Consumer<E>
impl<E> UnwindSafe for Consumer<E>where
E: 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