-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
pub trait TimeOps<'graph>:
InternalTimeOps<'graph, InternalWindowedView = Self::WindowedViewType>
{
type WindowedViewType: TimeOps<'graph> + 'graph;
/// Create a view including all events between `start` (inclusive) and `end` (exclusive)
fn window<T1: IntoTime, T2: IntoTime>(&self, start: T1, end: T2) -> Self::WindowedViewType;
/// Create a view that only includes events at `time`
fn at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType;
/// Create a view that only includes events at the latest time
fn latest(&self) -> Self::WindowedViewType;
/// Create a view including all events that have not been explicitly deleted at `time`
///
/// This is equivalent to `before(time + 1)` for `EventGraph`s and `at(time)` for `PersitentGraph`s
fn snapshot_at<T: IntoTime>(&self, time: T) -> Self::WindowedViewType;
/// Create a view including all events that have not been explicitly deleted at the latest time
///
/// This is equivalent to a no-op for `EventGraph`s and `latest()` for `PersitentGraph`s
fn snapshot_latest(&self) -> Self::WindowedViewType;
/// Create a view that only includes events after `start` (exclusive)
fn after<T: IntoTime>(&self, start: T) -> Self::WindowedViewType;
/// Create a view that only includes events before `end` (exclusive)
fn before<T: IntoTime>(&self, end: T) -> Self::WindowedViewType;
}