pub enum CacheMode {
Enabled,
Disabled,
}Expand description
Whether HttpCache uses its entry-map cache to serve warm entries (issue #482).
Passed to HttpCache::set_cache_enabled. See that method’s docs for the override
NetworkMode::Offline has on this value.
Variants§
Enabled
The entry map is consulted and populated as usual.
Disabled
The entry map is bypassed entirely, except while NetworkMode::Offline overrides
this to behave as Enabled.
Implementations§
Source§impl CacheMode
impl CacheMode
Sourcepub fn from_enabled_flag(enabled: bool) -> Self
pub fn from_enabled_flag(enabled: bool) -> Self
Builds a CacheMode from a cache.enabled config/CLI flag (true means
Self::Enabled).
The single, explicitly named conversion point from that boundary’s bool
representation — see NetworkMode::from_offline_flag’s doc for why this is a named
constructor rather than a From<bool> impl.
Trait Implementations§
impl Copy for CacheMode
impl Eq for CacheMode
impl StructuralPartialEq for CacheMode
Auto Trait Implementations§
impl Freeze for CacheMode
impl RefUnwindSafe for CacheMode
impl Send for CacheMode
impl Sync for CacheMode
impl Unpin for CacheMode
impl UnsafeUnpin for CacheMode
impl UnwindSafe for CacheMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.