pub struct CacheEntry {
pub study_id: String,
pub series_id: String,
pub slice_index: usize,
pub quality: ImageQuality,
pub tier: CacheTier,
pub state: CacheEntryState,
pub size_bytes: usize,
pub created_at: Instant,
pub last_accessed: Instant,
pub access_count: u64,
pub data: Option<Arc<Vec<u8>>>,
}Expand description
A single cache entry (image at a specific quality level)
Fields§
§study_id: StringStudy ID this entry belongs to
series_id: StringSeries ID within the study
slice_index: usizeSlice index (for multi-slice series)
quality: ImageQualityQuality level of this entry
tier: CacheTierCurrent cache tier
state: CacheEntryStateEntry state
size_bytes: usizeMemory size in bytes
created_at: InstantWhen entry was created
last_accessed: InstantWhen entry was last accessed
access_count: u64Access count for frequency tracking
data: Option<Arc<Vec<u8>>>Pixel data (if loaded)
Implementations§
Source§impl CacheEntry
impl CacheEntry
Sourcepub fn new(
study_id: String,
series_id: String,
slice_index: usize,
quality: ImageQuality,
tier: CacheTier,
) -> Self
pub fn new( study_id: String, series_id: String, slice_index: usize, quality: ImageQuality, tier: CacheTier, ) -> Self
Create a new cache entry
Sourcepub fn set_failed(&mut self)
pub fn set_failed(&mut self)
Mark entry as failed
Trait Implementations§
Source§impl Clone for CacheEntry
impl Clone for CacheEntry
Source§fn clone(&self) -> CacheEntry
fn clone(&self) -> CacheEntry
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 moreAuto Trait Implementations§
impl Freeze for CacheEntry
impl RefUnwindSafe for CacheEntry
impl Send for CacheEntry
impl Sync for CacheEntry
impl Unpin for CacheEntry
impl UnwindSafe for CacheEntry
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