pub struct Cache { /* private fields */ }Implementations§
Source§impl Cache
impl Cache
pub fn new(capacity: usize) -> Self
pub fn with_sender(capacity: usize, sender: Sender<Event>) -> Self
pub fn set_event(&mut self, sender: Sender<Event>)
pub fn remove_event(&mut self)
pub fn insert<T, V>(&mut self, key: T, value: V)
pub fn get(&self, key: &str) -> Option<&Value>
pub fn get_mut(&mut self, key: &str) -> Option<&mut Value>
pub fn capacity(&self) -> usize
pub fn set_capacity(&mut self, capacity: usize)
pub fn remove(&mut self, key: &str) -> Result<(), Error>
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn contains_key(&self, key: &str) -> bool
pub fn list<T>(&self, props: T) -> Result<Vec<(String, &Value)>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cache
impl RefUnwindSafe for Cache
impl Send for Cache
impl Sync for Cache
impl Unpin for Cache
impl UnwindSafe for Cache
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