Struct twilight_cache_inmemory::InMemoryCacheBuilder [−][src]
pub struct InMemoryCacheBuilder(_);
Expand description
Builder to configure and construct an InMemoryCache
.
Implementations
impl InMemoryCacheBuilder
[src]
impl InMemoryCacheBuilder
[src]pub fn new() -> Self
[src]
pub fn new() -> Self
[src]Creates a builder to configure and construct an InMemoryCache
.
pub fn build(self) -> InMemoryCache
[src]
pub fn build(self) -> InMemoryCache
[src]Consume the builder, returning a configured cache.
pub fn resource_types(self, resource_types: ResourceType) -> Self
[src]
pub fn resource_types(self, resource_types: ResourceType) -> Self
[src]Sets the list of resource types for the cache to handle.
Defaults to all types.
pub fn message_cache_size(self, message_cache_size: usize) -> Self
[src]
pub fn message_cache_size(self, message_cache_size: usize) -> Self
[src]Sets the number of messages to cache per channel.
Defaults to 100.
Trait Implementations
impl Clone for InMemoryCacheBuilder
[src]
impl Clone for InMemoryCacheBuilder
[src]fn clone(&self) -> InMemoryCacheBuilder
[src]
fn clone(&self) -> InMemoryCacheBuilder
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for InMemoryCacheBuilder
[src]
impl Debug for InMemoryCacheBuilder
[src]impl Default for InMemoryCacheBuilder
[src]
impl Default for InMemoryCacheBuilder
[src]fn default() -> InMemoryCacheBuilder
[src]
fn default() -> InMemoryCacheBuilder
[src]Returns the “default value” for a type. Read more
impl PartialEq<InMemoryCacheBuilder> for InMemoryCacheBuilder
[src]
impl PartialEq<InMemoryCacheBuilder> for InMemoryCacheBuilder
[src]fn eq(&self, other: &InMemoryCacheBuilder) -> bool
[src]
fn eq(&self, other: &InMemoryCacheBuilder) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &InMemoryCacheBuilder) -> bool
[src]
fn ne(&self, other: &InMemoryCacheBuilder) -> bool
[src]This method tests for !=
.
impl Eq for InMemoryCacheBuilder
[src]
impl StructuralEq for InMemoryCacheBuilder
[src]
impl StructuralPartialEq for InMemoryCacheBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for InMemoryCacheBuilder
impl Send for InMemoryCacheBuilder
impl Sync for InMemoryCacheBuilder
impl Unpin for InMemoryCacheBuilder
impl UnwindSafe for InMemoryCacheBuilder
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more