pub struct SyncCacheAttributesBuilder { /* private fields */ }Expand description
Builder for SyncCacheAttributes following the Builder pattern
Implementations§
Source§impl SyncCacheAttributesBuilder
impl SyncCacheAttributesBuilder
pub fn new() -> Self
pub fn limit(self, limit: TokenStream2) -> Self
pub fn policy(self, policy: TokenStream2) -> Self
pub fn ttl(self, ttl: TokenStream2) -> Self
pub fn scope(self, scope: TokenStream2) -> Self
pub fn custom_name(self, name: Option<String>) -> Self
pub fn max_memory(self, max_memory: TokenStream2) -> Self
pub fn events(self, events: Vec<String>) -> Self
pub fn dependencies(self, dependencies: Vec<String>) -> Self
pub fn invalidate_on(self, invalidate_on: Option<Path>) -> Self
pub fn cache_if(self, cache_if: Option<Path>) -> Self
pub fn frequency_weight(self, frequency_weight: TokenStream2) -> Self
pub fn window_ratio(self, window_ratio: TokenStream2) -> Self
pub fn sketch_width(self, sketch_width: TokenStream2) -> Self
pub fn sketch_depth(self, sketch_depth: TokenStream2) -> Self
pub fn decay_interval(self, decay_interval: TokenStream2) -> Self
Sourcepub fn with_common(self, common: CommonAttributes) -> Self
pub fn with_common(self, common: CommonAttributes) -> Self
Apply common attributes from CommonAttributes struct
pub fn build(self) -> SyncCacheAttributes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncCacheAttributesBuilder
impl RefUnwindSafe for SyncCacheAttributesBuilder
impl !Send for SyncCacheAttributesBuilder
impl !Sync for SyncCacheAttributesBuilder
impl Unpin for SyncCacheAttributesBuilder
impl UnwindSafe for SyncCacheAttributesBuilder
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