pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub fn open(store: WarmStartStore, key: Fingerprint) -> Self
pub fn key(&self) -> &Fingerprint
Sourcepub fn try_load_with_source(&self) -> Option<LoadedEntry>
pub fn try_load_with_source(&self) -> Option<LoadedEntry>
Read the best available warm-start entry and report whether it came from this session’s exact key or from a preloaded near-match seed.
Callers that only need a seed can use Self::try_load. Callers that
may skip expensive validation on a finalized exact hit need this source
bit so a near-match prefix seed is never mistaken for a completed fit.
Sourcepub fn peek_load_with_source(&self) -> Option<LoadedEntry>
pub fn peek_load_with_source(&self) -> Option<LoadedEntry>
Read the currently available warm-start entry with source metadata, without consuming a preloaded near-match seed.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe for Session
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