Observer

Trait Observer 

Source
pub trait Observer<DC>:
    Send
    + Sync
    + 'static
where DC: DataController,
{ // Provided methods fn on_flush<'life0, 'async_trait>( &'life0 self, _cache_updates: Arc<UpdateIterator<DC>>, ) -> Pin<Box<dyn Future<Output = Result<(), DC::Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn on_flush_one<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _updates: &'life1 DC::Key, _update: &'life2 DC::CacheUpdate, ) -> Pin<Box<dyn Future<Output = Result<(), Arc<DC::Error>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn on_monitor_error<'life0, 'life1, 'async_trait>( &'life0 self, _error: &'life1 Arc<DC::Error>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn on_error<'life0, 'async_trait>( &'life0 self, _error: Arc<DC::Error>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn on_warning<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn on_debug<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } }
Expand description

The observer trait is used by the cache controller to notify user code about various events that happen in the cache controller.

Note: This functionality is currently rather limited and is considered experimental.

Provided Methods§

Source

fn on_flush<'life0, 'async_trait>( &'life0 self, _cache_updates: Arc<UpdateIterator<DC>>, ) -> Pin<Box<dyn Future<Output = Result<(), DC::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_flush_one<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _updates: &'life1 DC::Key, _update: &'life2 DC::CacheUpdate, ) -> Pin<Box<dyn Future<Output = Result<(), Arc<DC::Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn on_monitor_error<'life0, 'life1, 'async_trait>( &'life0 self, _error: &'life1 Arc<DC::Error>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_error<'life0, 'async_trait>( &'life0 self, _error: Arc<DC::Error>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn on_warning<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn on_debug<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§