#[non_exhaustive]pub struct Subscription {
pub ranges: Vec<Range>,
/* private fields */
}Expand description
Subscriber-side preferences for receiving a track.
Each subscriber holds its own Subscription; the publisher observes an
aggregate across all live subscribers via crate::track::Producer::subscription.
A subscriber can change its preferences after the fact with
crate::track::Subscriber::update.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.ranges: Vec<Range>The spans of the track to deliver; see Range.
The default is one range from Start::LATEST: the latest group, skipping each the
moment a newer one arrives. An empty list asks for nothing.
A request to the publisher, aggregated across every live subscriber as the union of
their ranges, and this subscriber’s read filter: it reads only the groups its own
ranges cover, whatever another subscriber widens the union to.
crate::track::Subscriber::with_range narrows the reads further. See Local cursor
vs wire preference.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn with_ranges(self, ranges: impl IntoIterator<Item = Range>) -> Self
pub fn with_ranges(self, ranges: impl IntoIterator<Item = Range>) -> Self
Replace Self::ranges, returning self for chaining.
Trait Implementations§
Source§impl Clone for Subscription
impl Clone for Subscription
Source§impl Debug for Subscription
impl Debug for Subscription
Source§impl Default for Subscription
impl Default for Subscription
impl Eq for Subscription
Source§impl PartialEq for Subscription
impl PartialEq for Subscription
impl StructuralPartialEq for Subscription
Auto Trait Implementations§
impl Freeze for Subscription
impl RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl UnwindSafe for Subscription
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.