#[non_exhaustive]pub enum CacheMode {
All,
OptIn,
}Available on crate feature
cache-aio only.Expand description
Defines the behavior of the cache regarding which commands should be cached.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
All
Try to cache every command. This is equivalent to calling crate::Cmd::set_cache_config/crate::Pipeline::set_cache_config on every command using OptIn mode. In this mode cache usage can’t be disabled using crate::Cmd::set_cache_config/crate::Pipeline::set_cache_config.
OptIn
Only try to cache commands which explicitly enabled caching. If OptIn is used crate::Cmd::set_cache_config/crate::Pipeline::set_cache_config must be used for caching to be tried for the command.
Trait Implementations§
impl Copy 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 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