Struct kitsune_p2p_dht::test_utils::OpData
source · pub struct OpData {
pub loc: Loc,
pub hash: OpHash,
pub size: u32,
pub timestamp: Timestamp,
}
Expand description
TODO: mark this as for testing only. This is indeed the type that Holochain provides.
Fields§
§loc: Loc
The DhtLocation
hash: OpHash
The hash of the op
size: u32
The size in bytes of the op data
timestamp: Timestamp
The timestamp that the op was created
Implementations§
Trait Implementations§
source§impl AccessOpStore<OpData> for TestNode
impl AccessOpStore<OpData> for TestNode
source§fn query_op_data(&self, region: &RegionCoords) -> Vec<Op>
fn query_op_data(&self, region: &RegionCoords) -> Vec<Op>
Query the actual ops inside a region
source§fn query_region_data(&self, region: &RegionCoords) -> RegionData
fn query_region_data(&self, region: &RegionCoords) -> RegionData
Query the RegionData of a region, including the hash of all ops, size, and count
source§fn fetch_region_set(
&self,
coords: RegionCoordSetLtcs
) -> MustBoxFuture<'_, Result<RegionSetLtcs, ()>>
fn fetch_region_set( &self, coords: RegionCoordSetLtcs ) -> MustBoxFuture<'_, Result<RegionSetLtcs, ()>>
Fetch a set of Regions (the coords and the data) given the set of coords
source§fn integrate_ops<Ops: Clone + Iterator<Item = Op>>(&mut self, ops: Ops)
fn integrate_ops<Ops: Clone + Iterator<Item = Op>>(&mut self, ops: Ops)
Integrate incoming ops, updating the necessary stores
source§fn gossip_params(&self) -> GossipParams
fn gossip_params(&self) -> GossipParams
Get the GossipParams associated with this store
source§fn integrate_op(&mut self, op: Arc<O>)
fn integrate_op(&mut self, op: Arc<O>)
Integrate a single op
source§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
source§impl OpRegion for OpData
impl OpRegion for OpData
source§fn region_data(&self) -> RegionData
fn region_data(&self) -> RegionData
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.
source§fn bound(timestamp: Timestamp, loc: Loc) -> Self
fn bound(timestamp: Timestamp, loc: Loc) -> 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.
source§fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
The quantized space and time coordinates, based on the location and timestamp.
source§impl Ord for OpData
impl Ord for OpData
source§impl PartialEq for OpData
impl PartialEq for OpData
source§impl PartialOrd for OpData
impl PartialOrd for OpData
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for OpData
impl StructuralPartialEq for OpData
Auto Trait Implementations§
impl Freeze for OpData
impl RefUnwindSafe for OpData
impl Send for OpData
impl Sync for OpData
impl Unpin for OpData
impl UnwindSafe for OpData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.