pub struct DefaultListFilesCache { /* private fields */ }
Expand description
Collected files metadata for listing files. Cache will not invalided until user call remove or clear.
Trait Implementations§
Source§impl CacheAccessor<Path, Arc<Vec<ObjectMeta>>> for DefaultListFilesCache
impl CacheAccessor<Path, Arc<Vec<ObjectMeta>>> for DefaultListFilesCache
type Extra = ObjectMeta
Source§fn get_with_extra(
&self,
_k: &Path,
_e: &Self::Extra,
) -> Option<Arc<Vec<ObjectMeta>>>
fn get_with_extra( &self, _k: &Path, _e: &Self::Extra, ) -> Option<Arc<Vec<ObjectMeta>>>
Get value from cache.
Source§fn put(
&self,
key: &Path,
value: Arc<Vec<ObjectMeta>>,
) -> Option<Arc<Vec<ObjectMeta>>>
fn put( &self, key: &Path, value: Arc<Vec<ObjectMeta>>, ) -> Option<Arc<Vec<ObjectMeta>>>
Put value into cache. Returns the old value associated with the key if there was one.
Source§fn put_with_extra(
&self,
_key: &Path,
_value: Arc<Vec<ObjectMeta>>,
_e: &Self::Extra,
) -> Option<Arc<Vec<ObjectMeta>>>
fn put_with_extra( &self, _key: &Path, _value: Arc<Vec<ObjectMeta>>, _e: &Self::Extra, ) -> Option<Arc<Vec<ObjectMeta>>>
Put value into cache. Returns the old value associated with the key if there was one.
Source§fn remove(&mut self, k: &Path) -> Option<Arc<Vec<ObjectMeta>>>
fn remove(&mut self, k: &Path) -> Option<Arc<Vec<ObjectMeta>>>
Remove an entry from the cache, returning value if they existed in the map.
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 Default for DefaultListFilesCache
impl Default for DefaultListFilesCache
Source§fn default() -> DefaultListFilesCache
fn default() -> DefaultListFilesCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DefaultListFilesCache
impl !RefUnwindSafe for DefaultListFilesCache
impl Send for DefaultListFilesCache
impl Sync for DefaultListFilesCache
impl Unpin for DefaultListFilesCache
impl UnwindSafe for DefaultListFilesCache
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> 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