Module sorted_cache

Module sorted_cache 

Source
Expand description

Sorted view cache for maintaining ordered entity collections.

This module provides incremental maintenance of sorted entity views, enabling efficient windowed subscriptions (take/skip) with minimal recomputation on updates.

Structs§

OrderedFloat
Wrapper for f64 that implements Ord (treats NaN as less than all values)
SortKey
A sortable key that combines the sort value with entity key for stable ordering. Uses (sort_value, entity_key) tuple to ensure deterministic ordering even when sort values are equal.
SortedViewCache
Sorted view cache maintaining entities in sort order

Enums§

SortOrder
Sort order for the cache
SortValue
Comparable sort value extracted from JSON
UpsertResult
Result of an upsert operation
ViewDelta
Delta representing a change to a client’s windowed view