Trait holochain::prelude::dependencies::kitsune_p2p_types::dht::prelude::AccessOpStore
pub trait AccessOpStore<O, D = RegionData>: Sendwhere
O: OpRegion<D>,
D: RegionDataConstraints,{
// Required methods
fn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>;
fn query_region_data(&self, region: &RegionCoords) -> D;
fn fetch_region_set(
&self,
coords: RegionCoordSetLtcs
) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>> ⓘ;
fn integrate_ops<Ops>(&mut self, ops: Ops)
where Ops: Clone + Iterator<Item = Arc<O>>;
fn gossip_params(&self) -> GossipParams;
fn topo(&self) -> &Topology;
// Provided methods
fn integrate_op(&mut self, op: Arc<O>) { ... }
fn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D> { ... }
}
Expand description
All methods involved in accessing the op store, to be implemented by the host.
Required Methods§
fn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>
fn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>
Query the actual ops inside a region
fn query_region_data(&self, region: &RegionCoords) -> D
fn query_region_data(&self, region: &RegionCoords) -> D
Query the RegionData of a region, including the hash of all ops, size, and count
fn fetch_region_set(
&self,
coords: RegionCoordSetLtcs
) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>> ⓘ
fn fetch_region_set( &self, coords: RegionCoordSetLtcs ) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>> ⓘ
Fetch a set of Regions (the coords and the data) given the set of coords
fn integrate_ops<Ops>(&mut self, ops: Ops)
fn integrate_ops<Ops>(&mut self, ops: Ops)
Integrate incoming ops, updating the necessary stores
fn gossip_params(&self) -> GossipParams
fn gossip_params(&self) -> GossipParams
Get the GossipParams associated with this store
Provided Methods§
fn integrate_op(&mut self, op: Arc<O>)
fn integrate_op(&mut self, op: Arc<O>)
Integrate a single op
fn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D>
fn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D>
Get the RegionSet for this node, suitable for gossiping
Object Safety§
This trait is not object safe.