Skip to main content

HistoryProvider

Trait HistoryProvider 

Source
pub trait HistoryProvider:
    Send
    + Sync
    + 'static {
    // Required methods
    fn his_read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        start: Option<DateTime<FixedOffset>>,
        end: Option<DateTime<FixedOffset>>,
    ) -> Pin<Box<dyn Future<Output = Vec<HisItem>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn his_write<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
        items: Vec<HisItem>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for history storage backends.

Required Methods§

Source

fn his_read<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, start: Option<DateTime<FixedOffset>>, end: Option<DateTime<FixedOffset>>, ) -> Pin<Box<dyn Future<Output = Vec<HisItem>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read historical items for an entity within the optional time range.

Source

fn his_write<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, items: Vec<HisItem>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Write historical items for an entity.

Implementors§