Struct twilight_cache_inmemory::Config
source · pub struct Config { /* private fields */ }Expand description
Configuration for an InMemoryCache.
Implementations§
source§impl Config
impl Config
sourcepub const fn new() -> Self
pub const fn new() -> Self
Create a new default configuration.
Refer to individual getters for their defaults.
sourcepub const fn message_cache_size(&self) -> usize
pub const fn message_cache_size(&self) -> usize
Returns an immutable reference to the message cache size.
Defaults to 100.
sourcepub fn message_cache_size_mut(&mut self) -> &mut usize
pub fn message_cache_size_mut(&mut self) -> &mut usize
Returns a mutable reference to the message cache size.
sourcepub const fn resource_types(&self) -> ResourceType
pub const fn resource_types(&self) -> ResourceType
Returns an immutable reference to the resource types enabled.
Defaults to all resource types.
sourcepub fn resource_types_mut(&mut self) -> &mut ResourceType
pub fn resource_types_mut(&mut self) -> &mut ResourceType
Returns a mutable reference to the resource types enabled.