pub trait OpRegion<D = RegionData>: PartialOrd + Ord + Send + Sync + Debug {
    // Required methods
    fn loc(&self) -> DhtLocation;
    fn timestamp(&self) -> Timestamp;
    fn region_data(&self) -> D;
    fn bound(timestamp: Timestamp, loc: DhtLocation) -> Self;

    // Provided method
    fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords { ... }
}
Expand description

Everything that Kitsune needs to know about an Op. Intended to be implemented by the host.

Required Methods§

fn loc(&self) -> DhtLocation

The op’s Location

fn timestamp(&self) -> Timestamp

The op’s Timestamp

fn region_data(&self) -> D

The RegionData that would be produced if this op were the only op in the region. The sum of these produces the RegionData for the whole region.

fn bound(timestamp: Timestamp, loc: DhtLocation) -> Self

Create an Op with arbitrary data but that has the given timestamp and location. Used for bounded range queries based on the PartialOrd impl of the op.

Provided Methods§

fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords

The quantized space and time coordinates, based on the location and timestamp.

Object Safety§

This trait is not object safe.

Implementors§