pub struct CloudCacheConfig {
pub bucket: String,
pub prefix: String,
pub default_ttl: Duration,
pub enable_compression: bool,
pub compression_threshold: usize,
}Expand description
Cloud cache configuration
Fields§
§bucket: StringBucket/container name
prefix: StringKey prefix for all cache entries
default_ttl: DurationDefault TTL for cache entries
enable_compression: boolEnable compression for large values
compression_threshold: usizeCompression threshold in bytes
Implementations§
Source§impl CloudCacheConfig
impl CloudCacheConfig
Sourcepub fn new(bucket: impl Into<String>) -> Self
pub fn new(bucket: impl Into<String>) -> Self
Create a new configuration with the specified bucket
Sourcepub fn default_ttl(self, ttl: Duration) -> Self
pub fn default_ttl(self, ttl: Duration) -> Self
Set the default TTL
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable or disable compression
Sourcepub fn compression_threshold(self, threshold: usize) -> Self
pub fn compression_threshold(self, threshold: usize) -> Self
Set the compression threshold
Trait Implementations§
Source§impl Clone for CloudCacheConfig
impl Clone for CloudCacheConfig
Source§impl Debug for CloudCacheConfig
impl Debug for CloudCacheConfig
Auto Trait Implementations§
impl Freeze for CloudCacheConfig
impl RefUnwindSafe for CloudCacheConfig
impl Send for CloudCacheConfig
impl Sync for CloudCacheConfig
impl Unpin for CloudCacheConfig
impl UnsafeUnpin for CloudCacheConfig
impl UnwindSafe for CloudCacheConfig
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> BudgetAwareRouting for T
impl<T> BudgetAwareRouting for T
Source§fn filter_by_budget(
&self,
providers: Vec<String>,
budget_router: &BudgetAwareRouter,
) -> Vec<String>
fn filter_by_budget( &self, providers: Vec<String>, budget_router: &BudgetAwareRouter, ) -> Vec<String>
Filter providers based on budget availability
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.