Struct kdevice::cache::CacheGuard [−][src]
pub struct CacheGuard<'a, T: Cache>(_);
Expand description
Guard representing the unique ownership of a cache entry.
Implementations
impl<'a, T: Cache> CacheGuard<'a, T>
[src]
impl<'a, T: Cache> CacheGuard<'a, T>
[src]pub async fn unlock(self, flush: bool) -> Result<()>
[src]
pub async fn unlock(self, flush: bool) -> Result<()>
[src]Release the cache entry.
If flush is true, the data will be flushed to disk if modified. Otherwise, it won’t be flushed until dropped from in-memory cache. If error, just release the lock and donot flush any data to disk.
If flush is false, this operation will always succeed.
Trait Implementations
impl<T: Cache> Debug for CacheGuard<'_, T>
[src]
impl<T: Cache> Debug for CacheGuard<'_, T>
[src]impl<T: Cache> Deref for CacheGuard<'_, T>
[src]
impl<T: Cache> Deref for CacheGuard<'_, T>
[src]impl<T: Cache> DerefMut for CacheGuard<'_, T>
[src]
impl<T: Cache> DerefMut for CacheGuard<'_, T>
[src]Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for CacheGuard<'a, T>
impl<'a, T> Send for CacheGuard<'a, T> where
T: Sync,
<T as Cache>::Key: Sync,
<T as Cache>::Value: Sync,
T: Sync,
<T as Cache>::Key: Sync,
<T as Cache>::Value: Sync,
impl<'a, T> Sync for CacheGuard<'a, T> where
T: Sync,
<T as Cache>::Key: Sync,
<T as Cache>::Value: Sync,
T: Sync,
<T as Cache>::Key: Sync,
<T as Cache>::Value: Sync,