pub struct InMemoryCacheBuilder(/* private fields */);
Expand description
Builder to configure and construct an InMemoryCache
.
Implementations§
Source§impl InMemoryCacheBuilder
impl InMemoryCacheBuilder
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a builder to configure and construct InMemoryCache
Sourcepub fn cache_users(self, value: bool) -> Self
pub fn cache_users(self, value: bool) -> Self
Set whether users should be cached.
Sourcepub fn cache_servers(self, value: bool) -> Self
pub fn cache_servers(self, value: bool) -> Self
Set whether servers should be cached.
Sourcepub fn cache_channels(self, value: bool) -> Self
pub fn cache_channels(self, value: bool) -> Self
Set whether channels should be cached.
Sourcepub fn cache_messages(self, value: bool) -> Self
pub fn cache_messages(self, value: bool) -> Self
Set whether messages should be cached.
Sourcepub fn cache_emojis(self, value: bool) -> Self
pub fn cache_emojis(self, value: bool) -> Self
Set whether emojis should be cached.
Sourcepub fn cache_members(self, value: bool) -> Self
pub fn cache_members(self, value: bool) -> Self
Set whether members should be cached.
Sourcepub fn build(self) -> InMemoryCache
pub fn build(self) -> InMemoryCache
Consume the builder, returning a configured cache.
Trait Implementations§
Source§impl Debug for InMemoryCacheBuilder
impl Debug for InMemoryCacheBuilder
Source§impl Default for InMemoryCacheBuilder
impl Default for InMemoryCacheBuilder
Source§fn default() -> InMemoryCacheBuilder
fn default() -> InMemoryCacheBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryCacheBuilder
impl RefUnwindSafe for InMemoryCacheBuilder
impl Send for InMemoryCacheBuilder
impl Sync for InMemoryCacheBuilder
impl Unpin for InMemoryCacheBuilder
impl UnwindSafe for InMemoryCacheBuilder
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