pub struct CachedFileList {
pub files: Arc<Vec<ObjectMeta>>,
}Expand description
Cached file listing.
TTL expiration is handled internally by the cache implementation.
Fields§
§files: Arc<Vec<ObjectMeta>>The cached file list.
Implementations§
Source§impl CachedFileList
impl CachedFileList
Sourcepub fn new(files: Vec<ObjectMeta>) -> Self
pub fn new(files: Vec<ObjectMeta>) -> Self
Create a new cached file list.
Sourcepub fn files_matching_prefix(
&self,
prefix: &Option<Path>,
) -> Arc<Vec<ObjectMeta>>
pub fn files_matching_prefix( &self, prefix: &Option<Path>, ) -> Arc<Vec<ObjectMeta>>
Returns files matching the given prefix.
When prefix is None, returns a clone of the Arc (no data copy).
When filtering is needed, returns a new Arc with filtered results (clones each matching ObjectMeta).
Trait Implementations§
Source§impl CacheAccessor<TableScopedPath, CachedFileList> for DefaultListFilesCache
impl CacheAccessor<TableScopedPath, CachedFileList> for DefaultListFilesCache
Source§fn get(&self, key: &TableScopedPath) -> Option<CachedFileList>
fn get(&self, key: &TableScopedPath) -> Option<CachedFileList>
Get a cached entry if it exists. Read more
Source§fn put(
&self,
key: &TableScopedPath,
value: CachedFileList,
) -> Option<CachedFileList>
fn put( &self, key: &TableScopedPath, value: CachedFileList, ) -> Option<CachedFileList>
Store a value in the cache. Read more
Source§fn remove(&self, k: &TableScopedPath) -> Option<CachedFileList>
fn remove(&self, k: &TableScopedPath) -> Option<CachedFileList>
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 CachedFileList
impl Clone for CachedFileList
Source§fn clone(&self) -> CachedFileList
fn clone(&self) -> CachedFileList
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 moreSource§impl Debug for CachedFileList
impl Debug for CachedFileList
Source§impl Deref for CachedFileList
impl Deref for CachedFileList
Source§impl From<Vec<ObjectMeta>> for CachedFileList
impl From<Vec<ObjectMeta>> for CachedFileList
Source§fn from(files: Vec<ObjectMeta>) -> Self
fn from(files: Vec<ObjectMeta>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CachedFileList
impl PartialEq for CachedFileList
impl StructuralPartialEq for CachedFileList
Auto Trait Implementations§
impl Freeze for CachedFileList
impl RefUnwindSafe for CachedFileList
impl Send for CachedFileList
impl Sync for CachedFileList
impl Unpin for CachedFileList
impl UnsafeUnpin for CachedFileList
impl UnwindSafe for CachedFileList
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