pub struct ReadHandle { /* private fields */ }Expand description
A read that may not have finished yet.
The disk tier is asynchronous by construction, not as a later
retrofit: DiskKvStore::get is this handle plus a wait, so
there is no synchronous read path that a prefetch has to work
around.
Implementations§
Source§impl ReadHandle
impl ReadHandle
Sourcepub fn is_ready(&self) -> bool
pub fn is_ready(&self) -> bool
True if the block is already in hand – a memory hit, a miss, or a prefetch that has landed.
Sourcepub fn try_claim(&self) -> Option<ReadOutcome>
pub fn try_claim(&self) -> Option<ReadOutcome>
The result, without blocking. Returns None if the read is
still running.
Sourcepub fn wait(self) -> ReadOutcome
pub fn wait(self) -> ReadOutcome
Blocks until the read finishes.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ReadHandle
impl !UnwindSafe for ReadHandle
impl Freeze for ReadHandle
impl Send for ReadHandle
impl Sync for ReadHandle
impl Unpin for ReadHandle
impl UnsafeUnpin for ReadHandle
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
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