pub struct CacheLine { /* private fields */ }Expand description
Represents a single cache line with key, value, and metadata.
Implementations§
Source§impl CacheLine
impl CacheLine
pub fn new(key: &str, data: Vec<u8>) -> Self
pub fn invalid() -> Self
pub fn key(&self) -> &str
pub fn data(&self) -> &[u8] ⓘ
pub fn access(&mut self) -> &[u8] ⓘ
pub fn write(&mut self, data: Vec<u8>)
pub fn is_dirty(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn invalidate(&mut self)
pub fn access_count(&self) -> u64
pub fn size(&self) -> usize
pub fn mark_clean(&mut self)
pub fn matches_key(&self, key: &str) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheLine
impl RefUnwindSafe for CacheLine
impl Send for CacheLine
impl Sync for CacheLine
impl Unpin for CacheLine
impl UnsafeUnpin for CacheLine
impl UnwindSafe for CacheLine
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