pub enum CacheProbe {
NotCached,
Hit(Vec<u8>),
Miss(CacheSlot),
}Expand description
v2.89.0 — what a pre-dispatch probe found.
The three arms are the three different things a caller must do, which is why
this is not an Option<Vec<u8>>: “nothing memoises this call” and
“memoised, but absent” look identical to an Option and are not the same
fact — the first stores nothing afterwards, the second must.
Variants§
NotCached
No policy governs this call. Dispatch normally; store nothing.
Hit(Vec<u8>)
A memoised value. Do not dispatch, and do not charge a budget — that ordering is the design decision, and it is the caller’s to honour.
Miss(CacheSlot)
Memoised but absent. Dispatch, then hand the value to
CacheRuntime::store with this slot.
Trait Implementations§
Source§impl Clone for CacheProbe
impl Clone for CacheProbe
Source§fn clone(&self) -> CacheProbe
fn clone(&self) -> CacheProbe
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CacheProbe
impl Debug for CacheProbe
impl Eq for CacheProbe
Source§impl PartialEq for CacheProbe
impl PartialEq for CacheProbe
impl StructuralPartialEq for CacheProbe
Auto Trait Implementations§
impl Freeze for CacheProbe
impl RefUnwindSafe for CacheProbe
impl Send for CacheProbe
impl Sync for CacheProbe
impl Unpin for CacheProbe
impl UnsafeUnpin for CacheProbe
impl UnwindSafe for CacheProbe
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