pub trait Cache: Send + Sync {
// Required methods
fn close<'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 device(&self) -> &dyn DeviceCache;
fn device_route(&self) -> &dyn DeviceRouteCache;
fn network_route(&self) -> &dyn NetworkRouteCache;
}
Expand description
The top level trait to get all caches.
Required Methods§
Sourcefn close<'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 close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close database connection.
Sourcefn device(&self) -> &dyn DeviceCache
fn device(&self) -> &dyn DeviceCache
To get the device cache.
Sourcefn device_route(&self) -> &dyn DeviceRouteCache
fn device_route(&self) -> &dyn DeviceRouteCache
To get the device route cache.
Sourcefn network_route(&self) -> &dyn NetworkRouteCache
fn network_route(&self) -> &dyn NetworkRouteCache
To get the network route cache.