pub struct CursorReads { /* private fields */ }Expand description
Where each cursor may read (alpha2_eval::ActiveIndex::source_reads), which tells a shard
which session it can close and which one is read last. An unknown cursor is taken to be read
now, so it is never closed early and is evicted only by recency.
Implementations§
Source§impl CursorReads
impl CursorReads
Sourcepub fn new(reads: Vec<SourceRead>) -> Self
pub fn new(reads: Vec<SourceRead>) -> Self
The spans every cursor reads, from the active index.
Sourcepub fn knows(&self, cursor: &DecodeCursorKey) -> bool
pub fn knows(&self, cursor: &DecodeCursorKey) -> bool
Whether cursor has spans.
Sourcepub fn next_read(
&self,
cursor: &DecodeCursorKey,
time: MediaTime,
) -> Option<MediaTime>
pub fn next_read( &self, cursor: &DecodeCursorKey, time: MediaTime, ) -> Option<MediaTime>
time itself inside a span, else the next span’s start; None when nothing is read from
time on or the cursor is unknown.
Sourcepub fn finished(&self, cursor: &DecodeCursorKey, time: MediaTime) -> bool
pub fn finished(&self, cursor: &DecodeCursorKey, time: MediaTime) -> bool
Whether cursor reads nothing from time on.
Trait Implementations§
Source§impl Debug for CursorReads
impl Debug for CursorReads
Auto Trait Implementations§
impl Forget for CursorReads
impl Freeze for CursorReads
impl Move for CursorReads
impl RefUnwindSafe for CursorReads
impl Send for CursorReads
impl Sync for CursorReads
impl Unpin for CursorReads
impl UnsafeUnpin for CursorReads
impl UnwindSafe for CursorReads
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more