pub enum CacheBackend {
Memory,
Redis,
Memcache,
}Expand description
Which cache backend to use.
Variants§
Memory
In-process HashMap + TTL. Single-process; the default.
Redis
Redis (GET/SET EX), distributed. Requires the cache-redis feature.
Memcache
Memcached, distributed. Requires the cache-memcache feature.
Trait Implementations§
Source§impl Clone for CacheBackend
impl Clone for CacheBackend
Source§fn clone(&self) -> CacheBackend
fn clone(&self) -> CacheBackend
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 moreimpl Copy for CacheBackend
Source§impl Debug for CacheBackend
impl Debug for CacheBackend
Source§impl Default for CacheBackend
impl Default for CacheBackend
Source§fn default() -> CacheBackend
fn default() -> CacheBackend
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CacheBackend
impl<'de> Deserialize<'de> for CacheBackend
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CacheBackend
Source§impl PartialEq for CacheBackend
impl PartialEq for CacheBackend
Source§fn eq(&self, other: &CacheBackend) -> bool
fn eq(&self, other: &CacheBackend) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CacheBackend
Auto Trait Implementations§
impl Freeze for CacheBackend
impl RefUnwindSafe for CacheBackend
impl Send for CacheBackend
impl Sync for CacheBackend
impl Unpin for CacheBackend
impl UnsafeUnpin for CacheBackend
impl UnwindSafe for CacheBackend
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.