#[non_exhaustive]pub struct Refresh {
pub ratio: Option<u32>,
pub interval: Option<Duration>,
}Expand description
When a reader of a track asks its publisher for a new group, which TRACK_INFO carries.
A track opting in starts each group with an independent frame (a snapshot or a keyframe) that the frames after it build on, so a new group is something the publisher can make on request. A request asks for a group starting past the newest one; every hop judges it against its own cache, which holds the same group, and requests made while one is pending coalesce into it. The reader still receives the cached group while the new one is pending.
A live join asks when the newest group outweighs ratio (any join
without one). Subscriber::refresh asks regardless of the ratio on a track with an
interval, and like a join otherwise. Either request waits out the
interval: it takes effect only once the newest group arrived at least that long ago, so
the interval caps how often the publisher makes groups however many readers ask. A
track with no group asks for its first at once. The default asks for nothing.
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.ratio: Option<u32>The ratio of a group’s bytes after its first frame to the first frame past which a
live join asks for a new group: once the deltas outweigh ratio times the first
frame, a fresh group is cheaper for the joiner. Some(0) asks on any join once a delta
follows the first frame.
interval: Option<Duration>How long after the newest group arrived a request may ask for another, measured on each hop’s own clock from when the group reached it (or, at the publisher, was created), as expiry measures it. A request made sooner waits until then.
Encoded as milliseconds like Info::max_age; sub-millisecond precision is
truncated.
Implementations§
Trait Implementations§
impl Copy for Refresh
impl Eq for Refresh
impl StructuralPartialEq for Refresh
Auto Trait Implementations§
impl Freeze for Refresh
impl RefUnwindSafe for Refresh
impl Send for Refresh
impl Sync for Refresh
impl Unpin for Refresh
impl UnsafeUnpin for Refresh
impl UnwindSafe for Refresh
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.