Notifier

Trait Notifier 

Source
pub trait Notifier:
    Sync
    + Send
    + Clone {
    // Required method
    fn notify<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        source: &'life1 str,
        items: Vec<Item>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn num_items_each_notify(&self) -> usize { ... }
}

Required Methods§

Source

fn notify<'life0, 'life1, 'async_trait>( &'life0 mut self, source: &'life1 str, items: Vec<Item>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn num_items_each_notify(&self) -> usize

The number of items to be notified each time.

If it is 0, all items will be notified at once.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§