pub struct History<'a, T>(pub T, _);Tuple Fields§
§0: TImplementations§
Source§impl<'a, T: InternalHistoryOps + 'a> History<'a, T>
impl<'a, T: InternalHistoryOps + 'a> History<'a, T>
Sourcepub fn new(item: T) -> Self
pub fn new(item: T) -> Self
Create a new History wrapper around an object implementing InternalHistoryOps.
Sourcepub fn reverse(self) -> History<'a, ReversedHistoryOps<T>>
pub fn reverse(self) -> History<'a, ReversedHistoryOps<T>>
Reverse the iteration order of history items returned by iter and iter_rev.
Sourcepub fn t(self) -> HistoryTimestamp<T>
pub fn t(self) -> HistoryTimestamp<T>
Convert this History object to return timestamps (milliseconds since the Unix epoch) instead of EventTime.
Sourcepub fn dt(self) -> HistoryDateTime<T>
pub fn dt(self) -> HistoryDateTime<T>
Convert this History object to return datetimes instead of EventTime.
Sourcepub fn event_id(self) -> HistoryEventId<T>
pub fn event_id(self) -> HistoryEventId<T>
Convert this History object to return the event ids from EventTime entries.
Sourcepub fn intervals(self) -> Intervals<T>
pub fn intervals(self) -> Intervals<T>
Access the intervals (differences in milliseconds) between consecutive timestamps in this History object.
Sourcepub fn merge<R: InternalHistoryOps>(
self,
right: History<'_, R>,
) -> History<'_, MergedHistory<T, R>>
pub fn merge<R: InternalHistoryOps>( self, right: History<'_, R>, ) -> History<'_, MergedHistory<T, R>>
Merge this History with another History.
Sourcepub fn iter(&self) -> BoxedLIter<'_, EventTime>
pub fn iter(&self) -> BoxedLIter<'_, EventTime>
Iterate over EventTime entries in chronological order.
Sourcepub fn iter_rev(&self) -> BoxedLIter<'_, EventTime>
pub fn iter_rev(&self) -> BoxedLIter<'_, EventTime>
Iterate over EventTime entries in reverse chronological order.
Sourcepub fn collect_rev(&self) -> Vec<EventTime>
pub fn collect_rev(&self) -> Vec<EventTime>
Collect all EventTime entries in reverse chronological order.
Sourcepub fn earliest_time(&self) -> Option<EventTime>
pub fn earliest_time(&self) -> Option<EventTime>
Get the earliest EventTime entry in this History.
Sourcepub fn latest_time(&self) -> Option<EventTime>
pub fn latest_time(&self) -> Option<EventTime>
Get the latest EventTime entry in this History.
Sourcepub fn first(&self) -> Option<EventTime>
pub fn first(&self) -> Option<EventTime>
Get the first item produced by forward iteration in this History.
Sourcepub fn last(&self) -> Option<EventTime>
pub fn last(&self) -> Option<EventTime>
Get the first item produced by reverse iteration in this History.
Source§impl History<'_, EmptyHistory>
impl History<'_, EmptyHistory>
Sourcepub fn create_empty() -> Self
pub fn create_empty() -> Self
Create an empty history.
Source§impl<T: IntoArcDynHistoryOps> History<'_, T>
impl<T: IntoArcDynHistoryOps> History<'_, T>
Sourcepub fn into_arc_dyn(self) -> History<'static, Arc<dyn InternalHistoryOps>>
pub fn into_arc_dyn(self) -> History<'static, Arc<dyn InternalHistoryOps>>
Convert this history into an ArcSend + Sync). Particularly useful for Python.
Trait Implementations§
Source§impl<'graph, G: GraphView + 'graph> From<History<'graph, NodeView<'graph, G>>> for HistoryStruct
impl<'graph, G: GraphView + 'graph> From<History<'graph, NodeView<'graph, G>>> for HistoryStruct
Source§impl<'a, T: InternalHistoryOps + 'a> IntoIterator for History<'a, T>
impl<'a, T: InternalHistoryOps + 'a> IntoIterator for History<'a, T>
Source§impl<'a, T: InternalHistoryOps + 'a> PartialEq for History<'a, T>
impl<'a, T: InternalHistoryOps + 'a> PartialEq for History<'a, T>
impl<'a, T: Copy> Copy for History<'a, T>
impl<'a, T: InternalHistoryOps + 'a> Eq for History<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for History<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for History<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for History<'a, T>
impl<'a, T> Sync for History<'a, T>where
T: Sync,
impl<'a, T> Unpin for History<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for History<'a, T>where
T: UnsafeUnpin,
impl<'a, T> UnwindSafe for History<'a, T>where
T: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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