pub enum CacheStrategy {
Lru(NonZero<usize>),
NoCache,
}
Variants§
Lru(NonZero<usize>)
Use LRU cache with a fixed size
NoCache
No caching, always create new TopicPath instances
Implementations§
Source§impl CacheStrategy
impl CacheStrategy
Sourcepub fn new(capacity: usize) -> CacheStrategy
pub fn new(capacity: usize) -> CacheStrategy
Create a new cache strategy with the specified capacity.
Returns NoCache
if capacity is 0,
otherwise returns Lru
with the given capacity.
Trait Implementations§
Source§impl Clone for CacheStrategy
impl Clone for CacheStrategy
Source§fn clone(&self) -> CacheStrategy
fn clone(&self) -> CacheStrategy
Returns a duplicate 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 CacheStrategy
impl Debug for CacheStrategy
Source§impl Default for CacheStrategy
impl Default for CacheStrategy
Source§fn default() -> CacheStrategy
fn default() -> CacheStrategy
Returns the “default value” for a type. Read more
impl Copy for CacheStrategy
Auto Trait Implementations§
impl Freeze for CacheStrategy
impl RefUnwindSafe for CacheStrategy
impl Send for CacheStrategy
impl Sync for CacheStrategy
impl Unpin for CacheStrategy
impl UnwindSafe for CacheStrategy
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