pub struct CacheEntry {
pub hash: u64,
pub mtime: SystemTime,
}Expand description
Cache entry for a single file
Fields§
§hash: u64Content hash (e.g., xxhash of file contents)
mtime: SystemTimeLast modification time
Implementations§
Source§impl CacheEntry
impl CacheEntry
Sourcepub fn new(hash: u64, mtime: SystemTime) -> Self
pub fn new(hash: u64, mtime: SystemTime) -> Self
Create a new cache entry
Sourcepub fn is_fresh(&self, current_mtime: SystemTime) -> bool
pub fn is_fresh(&self, current_mtime: SystemTime) -> bool
Check if entry is fresh compared to current mtime
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 (const: unstable) · 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 UnsafeUnpin 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