pub struct WindowHistory { /* private fields */ }Expand description
In-memory history of open and closed windows.
Implementations§
Source§impl WindowHistory
impl WindowHistory
Sourcepub fn compare(&self, name: impl Into<String>) -> WindowComparisonBuilder<'_>
pub fn compare(&self, name: impl Into<String>) -> WindowComparisonBuilder<'_>
Starts a fluent comparison builder over the recorded history.
Source§impl WindowHistory
impl WindowHistory
Sourcepub fn closed_windows(&self) -> &[ClosedWindow]
pub fn closed_windows(&self) -> &[ClosedWindow]
Returns closed windows.
Sourcepub fn open_windows(&self) -> &[OpenWindow]
pub fn open_windows(&self) -> &[OpenWindow]
Returns open windows.
Sourcepub fn annotations(&self) -> &[WindowAnnotation]
pub fn annotations(&self) -> &[WindowAnnotation]
Returns all annotations attached to recorded windows.
Sourcepub fn windows(&self) -> Vec<WindowRecord>
pub fn windows(&self) -> Vec<WindowRecord>
Returns all windows in deterministic query order.
Sourcepub fn query(&self) -> WindowHistoryRefQuery<'_>
pub fn query(&self) -> WindowHistoryRefQuery<'_>
Starts a direct read-only query borrowing this history.
Sourcepub fn for_window(&self, window_name: &str) -> Vec<WindowRecord>
pub fn for_window(&self, window_name: &str) -> Vec<WindowRecord>
Returns recorded windows for a configured window name.
Sourcepub fn with_segment(
&self,
name: &str,
value: impl Into<PrimitiveValue>,
) -> Vec<WindowRecord>
pub fn with_segment( &self, name: &str, value: impl Into<PrimitiveValue>, ) -> Vec<WindowRecord>
Returns windows containing a required segment value.
Sourcepub fn with_tag(
&self,
name: &str,
value: impl Into<PrimitiveValue>,
) -> Vec<WindowRecord>
pub fn with_tag( &self, name: &str, value: impl Into<PrimitiveValue>, ) -> Vec<WindowRecord>
Returns windows containing a required tag value.
Sourcepub fn snapshot_at(
&self,
horizon: TemporalPoint,
) -> Result<WindowHistorySnapshot, TemporalRangeError>
pub fn snapshot_at( &self, horizon: TemporalPoint, ) -> Result<WindowHistorySnapshot, TemporalRangeError>
Evaluates recorded windows at an explicit horizon.
Sourcepub fn find_overlaps(&self) -> Vec<WindowOverlap>
pub fn find_overlaps(&self) -> Vec<WindowOverlap>
Finds overlapping closed windows within the same window/key/partition scope.
Sourcepub fn find_residuals(&self, target_source: &str) -> Vec<WindowResidualSegment>
pub fn find_residuals(&self, target_source: &str) -> Vec<WindowResidualSegment>
Finds target-source closed segments not covered by other sources.
Sourcepub fn annotate(
&mut self,
target: WindowAnnotationTarget,
name: impl Into<String>,
value: impl Into<PrimitiveValue>,
known_at: Option<TemporalPoint>,
) -> WindowAnnotation
pub fn annotate( &mut self, target: WindowAnnotationTarget, name: impl Into<String>, value: impl Into<PrimitiveValue>, known_at: Option<TemporalPoint>, ) -> WindowAnnotation
Attaches append-only metadata to a recorded window target.
Sourcepub fn annotations_for(
&self,
target: &WindowAnnotationTarget,
) -> Vec<WindowAnnotation>
pub fn annotations_for( &self, target: &WindowAnnotationTarget, ) -> Vec<WindowAnnotation>
Returns annotations attached to a window target.
Sourcepub fn annotations_known_at(
&self,
target: &WindowAnnotationTarget,
horizon: TemporalPoint,
) -> Vec<WindowAnnotation>
pub fn annotations_known_at( &self, target: &WindowAnnotationTarget, horizon: TemporalPoint, ) -> Vec<WindowAnnotation>
Returns annotations whose known-at point is at or before a horizon.
Sourcepub fn compare_sources(
&self,
name: &str,
window_name: &str,
sources: &[String],
) -> SourceMatrixResult
pub fn compare_sources( &self, name: &str, window_name: &str, sources: &[String], ) -> SourceMatrixResult
Builds a directional source matrix for one recorded window family.
Sourcepub fn compare_hierarchy(
&self,
name: &str,
parent_window_name: &str,
child_window_name: &str,
) -> HierarchyComparisonResult
pub fn compare_hierarchy( &self, name: &str, parent_window_name: &str, child_window_name: &str, ) -> HierarchyComparisonResult
Compares parent and child window families as a hierarchy explanation.