pub struct SessionCacheMap { /* private fields */ }Expand description
Both the index and the values use atomic publication. Unlike a DashMap guard, a returned entry does not hold a shard lock while cloning a transcript.
Implementations§
Source§impl SessionCacheMap
impl SessionCacheMap
pub fn new() -> Self
pub fn insert(&self, id: String, snapshot: Arc<SessionSnapshot>)
pub fn get(&self, id: &str) -> Option<SessionCacheEntry>
pub fn remove(&self, id: &str) -> Option<(String, Arc<SessionSnapshot>)>
pub fn iter(&self) -> impl Iterator<Item = SessionCacheEntry> + '_
pub fn contains_key(&self, id: &str) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&self)
Trait Implementations§
Source§impl Default for SessionCacheMap
impl Default for SessionCacheMap
Source§fn default() -> SessionCacheMap
fn default() -> SessionCacheMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SessionCacheMap
impl !RefUnwindSafe for SessionCacheMap
impl !UnwindSafe for SessionCacheMap
impl Send for SessionCacheMap
impl Sync for SessionCacheMap
impl Unpin for SessionCacheMap
impl UnsafeUnpin for SessionCacheMap
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