pub enum CacheLookup {
Found(Vec<u8>),
Miss,
NotFound,
}Expand description
缓存查找结果
区分“缓存未命中“(需要回源)与“明确不存在“(负缓存命中,不回源), 避免缓存穿透(大量请求查询不存在的 key 导致回源压力)。
Variants§
Trait Implementations§
Source§impl Clone for CacheLookup
impl Clone for CacheLookup
Source§fn clone(&self) -> CacheLookup
fn clone(&self) -> CacheLookup
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 CacheLookup
impl Debug for CacheLookup
impl Eq for CacheLookup
Source§impl PartialEq for CacheLookup
impl PartialEq for CacheLookup
impl StructuralPartialEq for CacheLookup
Auto Trait Implementations§
impl Freeze for CacheLookup
impl RefUnwindSafe for CacheLookup
impl Send for CacheLookup
impl Sync for CacheLookup
impl Unpin for CacheLookup
impl UnsafeUnpin for CacheLookup
impl UnwindSafe for CacheLookup
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