Struct cache::multi::MultiCacheBuilder
source · pub struct MultiCacheBuilder { /* private fields */ }
Expand description
A builder for a MultiCache
.
Implementations§
source§impl MultiCacheBuilder
impl MultiCacheBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new MultiCacheBuilder
.
sourcepub fn skip_memory(&mut self) -> &mut Self
pub fn skip_memory(&mut self) -> &mut Self
Skips caching results in memory.
With this flag enabled, all cache accesses must go through a cache provider even if key in question was accessed earlier by the same process.
sourcepub fn with_provider(&mut self, client: Client) -> &mut Self
pub fn with_provider(&mut self, client: Client) -> &mut Self
Adds a new provider to the cache.
sourcepub fn build(&mut self) -> MultiCache
pub fn build(&mut self) -> MultiCache
Builds a MultiCache
from the configured parameters.
Trait Implementations§
source§impl Clone for MultiCacheBuilder
impl Clone for MultiCacheBuilder
source§fn clone(&self) -> MultiCacheBuilder
fn clone(&self) -> MultiCacheBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MultiCacheBuilder
impl Debug for MultiCacheBuilder
source§impl Default for MultiCacheBuilder
impl Default for MultiCacheBuilder
source§fn default() -> MultiCacheBuilder
fn default() -> MultiCacheBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for MultiCacheBuilder
impl Send for MultiCacheBuilder
impl Sync for MultiCacheBuilder
impl Unpin for MultiCacheBuilder
impl !UnwindSafe for MultiCacheBuilder
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request