pub struct CachedFileMetadata {
pub meta: ObjectMeta,
pub statistics: Arc<Statistics>,
pub ordering: Option<LexOrdering>,
}Expand description
Cached metadata for a file, including statistics and ordering.
This struct embeds the ObjectMeta used for cache validation,
along with the cached statistics and ordering information.
Fields§
§meta: ObjectMetaFile metadata used for cache validation (size, last_modified).
statistics: Arc<Statistics>Cached statistics for the file, if available.
ordering: Option<LexOrdering>Cached ordering for the file.
Implementations§
Source§impl CachedFileMetadata
impl CachedFileMetadata
Sourcepub fn new(
meta: ObjectMeta,
statistics: Arc<Statistics>,
ordering: Option<LexOrdering>,
) -> Self
pub fn new( meta: ObjectMeta, statistics: Arc<Statistics>, ordering: Option<LexOrdering>, ) -> 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.
Returns true if the file size and last modified time match.
Trait Implementations§
Source§impl CacheAccessor<TableScopedPath, CachedFileMetadata> for DefaultFileStatisticsCache
impl CacheAccessor<TableScopedPath, CachedFileMetadata> for DefaultFileStatisticsCache
Source§fn get(&self, key: &TableScopedPath) -> Option<CachedFileMetadata>
fn get(&self, key: &TableScopedPath) -> Option<CachedFileMetadata>
Get a cached entry if it exists. Read more
Source§fn put(
&self,
key: &TableScopedPath,
value: CachedFileMetadata,
) -> Option<CachedFileMetadata>
fn put( &self, key: &TableScopedPath, value: CachedFileMetadata, ) -> Option<CachedFileMetadata>
Store a value in the cache. Read more
Source§fn remove(&self, key: &TableScopedPath) -> Option<CachedFileMetadata>
fn remove(&self, key: &TableScopedPath) -> Option<CachedFileMetadata>
Remove an entry from the cache, returning the value if it existed.
Source§fn contains_key(&self, k: &TableScopedPath) -> bool
fn contains_key(&self, k: &TableScopedPath) -> bool
Check if the cache contains a specific key.
Source§impl Clone for CachedFileMetadata
impl Clone for CachedFileMetadata
Source§fn clone(&self) -> CachedFileMetadata
fn clone(&self) -> CachedFileMetadata
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 moreSource§impl DFHeapSize for CachedFileMetadata
impl DFHeapSize for CachedFileMetadata
Source§impl Debug for CachedFileMetadata
impl Debug for CachedFileMetadata
impl Eq for CachedFileMetadata
Source§impl PartialEq for CachedFileMetadata
impl PartialEq for CachedFileMetadata
Source§fn eq(&self, other: &CachedFileMetadata) -> bool
fn eq(&self, other: &CachedFileMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CachedFileMetadata
Auto Trait Implementations§
impl !RefUnwindSafe for CachedFileMetadata
impl !UnwindSafe for CachedFileMetadata
impl Freeze for CachedFileMetadata
impl Send for CachedFileMetadata
impl Sync for CachedFileMetadata
impl Unpin for CachedFileMetadata
impl UnsafeUnpin for CachedFileMetadata
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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