Skip to main content

HistoryProvider

Trait HistoryProvider 

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

Trait for history storage backends.

Required Methods§

Source

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

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

Source

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

Write historical items for an entity.

Implementors§