pub struct CacheBuilder { /* private fields */ }Expand description
Builder for creating caches with fallback
Implementations§
Source§impl CacheBuilder
impl CacheBuilder
Sourcepub fn config(self, config: CacheConfig) -> Self
pub fn config(self, config: CacheConfig) -> Self
Set cache configuration
Sourcepub fn with_fallback(self, enable: bool) -> Self
pub fn with_fallback(self, enable: bool) -> Self
Enable/disable fallback to memory cache
Sourcepub async fn build(self) -> OptionalCache
pub async fn build(self) -> OptionalCache
Build the cache
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheBuilder
impl RefUnwindSafe for CacheBuilder
impl Send for CacheBuilder
impl Sync for CacheBuilder
impl Unpin for CacheBuilder
impl UnsafeUnpin for CacheBuilder
impl UnwindSafe for CacheBuilder
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