pub trait Stream: Send + 'static {
type Ext: CatalogExt;
// Required method
fn poll_next(
&mut self,
waiter: &Waiter,
) -> Poll<Result<Option<Timed<Catalog<Self::Ext>>>>>;
// Provided methods
fn next(
&mut self,
) -> impl Future<Output = Result<Option<Timed<Catalog<Self::Ext>>>>> + Send
where Self: Sized { ... }
fn select(self, selection: Broadcast) -> Select<Self>
where Self: Sized { ... }
}Expand description
A stream of catalog snapshots.
poll_next returns the next snapshot (a full catalog, not a delta) with the timestamp it takes
effect at, or None once the underlying track has ended. Late snapshots supersede
earlier ones, so an implementation may drop intermediate snapshots.
Stream types are required to be Send + 'static so they can be moved
across threads and held inside exporters without per-call bounds.
Required Associated Types§
Sourcetype Ext: CatalogExt
type Ext: CatalogExt
The application extension carried by the yielded catalog (() for media-only).
Required Methods§
Sourcefn poll_next(
&mut self,
waiter: &Waiter,
) -> Poll<Result<Option<Timed<Catalog<Self::Ext>>>>>
fn poll_next( &mut self, waiter: &Waiter, ) -> Poll<Result<Option<Timed<Catalog<Self::Ext>>>>>
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.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<S: Stream + ?Sized> Stream for Box<S>
A boxed stream forwards to the stream it holds, so Box<dyn Stream<Ext = E>> is a stream.
impl<S: Stream + ?Sized> Stream for Box<S>
A boxed stream forwards to the stream it holds, so Box<dyn Stream<Ext = E>> is a stream.