#[non_exhaustive]pub enum SampleCursorItem {
Timed {
track_id: u32,
sample: Sample,
},
Sparse {
track_id: u32,
sample: Sample,
},
Lagged {
skipped: u64,
},
Degraded {
skipped: u64,
},
}std only.Expand description
One item SampleCursor::poll can hand back: data from either retention
class, or a loss report.
#[non_exhaustive]: this is the growth point for anything a cursor might
need to surface beyond “sample” or “loss” later, without a breaking
change to every match arm in the workspace.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Timed
A RetentionClass::Timed sample for track_id.
Fields
sample: SampleThe sample itself. Cloned from the ring’s stored copy —
Sample.data: Bytes is shared, not copied; see
Zero-copy fan-out.
Sparse
A RetentionClass::Sparse sample for track_id.
Fields
Lagged
This cursor fell behind the Timed ring: skipped entries were
evicted before it read them. Ordinary loss — resume from the next
sample; see RetentionClass::Timed.
Fields
Degraded
This cursor fell behind the Sparse ring: skipped entries were
evicted before it read them. Not ordinary loss — the consumer’s
derived state (e.g. splice-point tracking) is now wrong, not merely
gapped; see RetentionClass::Sparse for what a consumer is
expected to do about it.
Trait Implementations§
Source§impl Clone for SampleCursorItem
impl Clone for SampleCursorItem
Source§fn clone(&self) -> SampleCursorItem
fn clone(&self) -> SampleCursorItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more