pub struct CacheConfigBuilder { /* private fields */ }Implementations§
Source§impl CacheConfigBuilder
impl CacheConfigBuilder
pub fn new() -> Self
pub fn default_ttl(self, value: Option<Duration>) -> Self
pub fn max_entries(self, value: Option<usize>) -> Self
pub fn max_memory(self, value: Option<usize>) -> Self
pub fn connection_timeout(self, value: Duration) -> Self
pub fn operation_timeout(self, value: Duration) -> Self
pub fn compression(self, value: bool) -> Self
pub fn compression_threshold(self, value: usize) -> Self
pub fn build(self) -> Result<CacheConfig, BuildError>
pub fn build_with_defaults(self) -> Result<CacheConfig, BuildError>
Source§impl CacheConfigBuilder
impl CacheConfigBuilder
pub fn default_ttl_duration(self, ttl: Duration) -> Self
pub fn no_default_ttl(self) -> Self
pub fn max_entries_limit(self, max: usize) -> Self
pub fn unlimited_entries(self) -> Self
pub fn max_memory_bytes(self, bytes: usize) -> Self
pub fn unlimited_memory(self) -> Self
pub fn enable_compression(self, threshold: usize) -> Self
pub fn disable_compression(self) -> Self
pub fn build_config(self) -> CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfigBuilder
impl RefUnwindSafe for CacheConfigBuilder
impl Send for CacheConfigBuilder
impl Sync for CacheConfigBuilder
impl Unpin for CacheConfigBuilder
impl UnwindSafe for CacheConfigBuilder
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