pub struct AsyncCacheAttributesBuilder { /* private fields */ }Expand description
Builder for AsyncCacheAttributes following the Builder pattern
Implementations§
Source§impl AsyncCacheAttributesBuilder
impl AsyncCacheAttributesBuilder
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 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) -> AsyncCacheAttributes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncCacheAttributesBuilder
impl RefUnwindSafe for AsyncCacheAttributesBuilder
impl !Send for AsyncCacheAttributesBuilder
impl !Sync for AsyncCacheAttributesBuilder
impl Unpin for AsyncCacheAttributesBuilder
impl UnwindSafe for AsyncCacheAttributesBuilder
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