Trait holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dht::prelude::OpRegion
source · 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§
sourcefn loc(&self) -> DhtLocation
fn loc(&self) -> DhtLocation
The op’s Location
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.
sourcefn bound(timestamp: Timestamp, loc: DhtLocation) -> Self
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§
sourcefn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
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.