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.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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