pub struct SegmentCursor { /* private fields */ }std only.Expand description
A subscribed reader of a Trunk’s segment log. Obtained via
Trunk::subscribe_segments (ordinary, lossy-on-overflow) or
Trunk::pin_segments (pinning, ArchiveOverrun-governed) — read
those methods’ docs, and The DVR contradiction,
before creating more than a handful of these.
Implementations§
Source§impl SegmentCursor
impl SegmentCursor
Sourcepub fn poll(&mut self) -> Option<SegmentCursorItem>
pub fn poll(&mut self) -> Option<SegmentCursorItem>
Pull the next item, if any is ready.
Loss is always reported before further data, in the same
Option<SegmentCursorItem> as real segments — the same
cannot-be-skipped-past precedent as SampleCursor::poll/
crate::byte_tap::TapItem.
Trait Implementations§
Source§impl Drop for SegmentCursor
impl Drop for SegmentCursor
Source§fn drop(&mut self)
fn drop(&mut self)
Release this cursor’s pin, if it has one, so a dropped/abandoned
pinning cursor cannot hold retention open (or a StallIngest writer
blocked) forever — the same “a dead consumer must not grow memory
without limit” guarantee as an actively-Gap-ping cursor, for the
case where the consumer disappeared instead of choosing a policy.