pub struct CachedFileMetadataEntry {
pub meta: ObjectMeta,
pub file_metadata: Arc<dyn FileMetadata>,
}Expand description
Cached file metadata entry with validation information.
Fields§
§meta: ObjectMetaFile metadata used for cache validation (size, last_modified).
file_metadata: Arc<dyn FileMetadata>The cached file metadata.
Implementations§
Source§impl CachedFileMetadataEntry
impl CachedFileMetadataEntry
Sourcepub fn new(meta: ObjectMeta, file_metadata: Arc<dyn FileMetadata>) -> Self
pub fn new(meta: ObjectMeta, file_metadata: Arc<dyn FileMetadata>) -> Self
Create a new cached file metadata entry.
Sourcepub fn is_valid_for(&self, current_meta: &ObjectMeta) -> bool
pub fn is_valid_for(&self, current_meta: &ObjectMeta) -> bool
Check if this cached entry is still valid for the given metadata.
Trait Implementations§
Source§impl CacheAccessor<Path, CachedFileMetadataEntry> for DefaultFilesMetadataCache
impl CacheAccessor<Path, CachedFileMetadataEntry> for DefaultFilesMetadataCache
Source§fn get(&self, key: &Path) -> Option<CachedFileMetadataEntry>
fn get(&self, key: &Path) -> Option<CachedFileMetadataEntry>
Get a cached entry if it exists. Read more
Source§fn put(
&self,
key: &Path,
value: CachedFileMetadataEntry,
) -> Option<CachedFileMetadataEntry>
fn put( &self, key: &Path, value: CachedFileMetadataEntry, ) -> Option<CachedFileMetadataEntry>
Store a value in the cache. Read more
Source§fn remove(&self, k: &Path) -> Option<CachedFileMetadataEntry>
fn remove(&self, k: &Path) -> Option<CachedFileMetadataEntry>
Remove an entry from the cache, returning the value if it existed.
Source§fn contains_key(&self, k: &Path) -> bool
fn contains_key(&self, k: &Path) -> bool
Check if the cache contains a specific key.
Source§impl Clone for CachedFileMetadataEntry
impl Clone for CachedFileMetadataEntry
Source§fn clone(&self) -> CachedFileMetadataEntry
fn clone(&self) -> CachedFileMetadataEntry
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 CachedFileMetadataEntry
impl !RefUnwindSafe for CachedFileMetadataEntry
impl Send for CachedFileMetadataEntry
impl Sync for CachedFileMetadataEntry
impl Unpin for CachedFileMetadataEntry
impl UnsafeUnpin for CachedFileMetadataEntry
impl !UnwindSafe for CachedFileMetadataEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more