pub struct Range {
pub start: Start,
pub end: Option<u64>,
pub priority: i8,
pub order: Order,
}Expand description
A span of a track to deliver: from where Self::start places it through the group
containing end, a time in the track’s timescale (a bare start on a scale-less track).
Every range names whole groups: a subscription always starts at a group’s first frame,
since a group is the unit of decodability, and an end includes its group. A range from
Start::Time 2 through 6 delivers every group from the one containing time 2 through the
one containing time 6. An end before a time start is empty.
Only a group reached through a Start::Live range alone can go stale. A group several
ranges cover takes the largest max among them, and never goes stale while any history
range covers it.
Each range carries its own Self::priority and Self::order, so one subscription can
follow the live edge urgently while it backfills history at a lower priority.
Fields§
§start: StartWhere delivery starts; see Start.
end: Option<u64>Where delivery stops, including the group containing this time, or None to keep
following the live edge.
priority: i8How urgently this range’s groups go out, higher first, defaulting to 0. Higher values preempt lower ones when bandwidth is constrained. A group several ranges cover goes out at the highest priority among the ranges still wanting it.
order: OrderWhich of this range’s pending groups the publisher sends first, and the order
recv_group hands them out in; see Order. Among ranges of one priority, any
Order::Descending one wins, so a live range sheds the backlog first.
Implementations§
Source§impl Range
impl Range
Sourcepub const ALL: Self
pub const ALL: Self
Every group the publisher holds, following the live edge, at priority 0 newest first.
Sourcepub fn with_priority(self, priority: i8) -> Self
pub fn with_priority(self, priority: i8) -> Self
Set the delivery priority, returning self for chaining.
Sourcepub fn with_order(self, order: Order) -> Self
pub fn with_order(self, order: Order) -> Self
Set which pending group the publisher sends first, returning self for chaining.
Trait Implementations§
impl Copy for Range
Source§impl Default for Range
What Subscription::default asks: the latest group, skipping each the moment a newer one
arrives, at priority 0 newest first.
impl Default for Range
What Subscription::default asks: the latest group, skipping each the moment a newer one
arrives, at priority 0 newest first.
impl Eq for Range
Source§impl From<Start> for Range
Every group from where the start places it, following the live edge, at priority 0 newest
first.
impl From<Start> for Range
Every group from where the start places it, following the live edge, at priority 0 newest first.
Source§impl Ord for Range
impl Ord for Range
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Range
impl PartialOrd for Range
impl StructuralPartialEq for Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnsafeUnpin for Range
impl UnwindSafe for Range
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.