pub struct HisStore { /* private fields */ }Expand description
Thread-safe in-memory time-series store.
Maps entity IDs to sorted vectors of HisItem, ordered by timestamp.
Implementations§
Source§impl HisStore
impl HisStore
Sourcepub fn write(&self, id: &str, new_items: Vec<HisItem>)
pub fn write(&self, id: &str, new_items: Vec<HisItem>)
Write history items for a given point ID.
Items are merged into the existing series and the result is kept sorted by timestamp. Duplicate timestamps are replaced.
Trait Implementations§
Source§impl HistoryProvider for HisStore
impl HistoryProvider for HisStore
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,
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.
Auto Trait Implementations§
impl !Freeze for HisStore
impl !RefUnwindSafe for HisStore
impl Send for HisStore
impl Sync for HisStore
impl Unpin for HisStore
impl UnsafeUnpin for HisStore
impl UnwindSafe for HisStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more