pub enum RespCacheable {
Cacheable(CacheMeta),
Uncacheable(NoCacheReason),
}
Expand description
Response cacheable decision
Variants§
Cacheable(CacheMeta)
Uncacheable(NoCacheReason)
Implementations§
Source§impl RespCacheable
impl RespCacheable
Sourcepub fn is_cacheable(&self) -> bool
pub fn is_cacheable(&self) -> bool
Whether it is cacheable
Sourcepub fn unwrap_meta(self) -> CacheMeta
pub fn unwrap_meta(self) -> CacheMeta
Unwrap RespCacheable to get the CacheMeta stored
§Panic
Panic when this object is not cacheable. Check Self::is_cacheable() first.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RespCacheable
impl !RefUnwindSafe for RespCacheable
impl Send for RespCacheable
impl Sync for RespCacheable
impl Unpin for RespCacheable
impl !UnwindSafe for RespCacheable
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