Trait kitsune_p2p_dht::op::OpRegion
source · pub trait OpRegion<D = RegionData>: PartialOrd + Ord + Send + Sync + Debug {
fn loc(&self) -> Loc;
fn timestamp(&self) -> Timestamp;
fn region_data(&self) -> D;
fn bound(timestamp: Timestamp, loc: Loc) -> Self;
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§
sourcefn region_data(&self) -> D
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.
Provided Methods§
sourcefn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
The quantized space and time coordinates, based on the location and timestamp.