pub trait DeviceCache: Sync {
// Required methods
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCacheItem>, Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
value: Option<&'life2 DeviceCacheItem>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn del<'life0, 'life1, 'async_trait>(
&'life0 self,
cond: &'life1 DelCacheQueryCond<'_>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Cache operations.
Required Methods§
Sourcefn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
To clear all devices.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCacheItem>, Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCacheItem>, Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
To get device.
Sourcefn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
value: Option<&'life2 DeviceCacheItem>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cond: &'life1 GetCacheQueryCond<'_>,
value: Option<&'life2 DeviceCacheItem>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
To set device.