Struct kitsune_p2p_dht::region::RegionData
source · [−]pub struct RegionData {
pub hash: RegionHash,
pub size: u32,
pub count: u32,
}
Expand description
The pertinent data that we care about for each Region. This is what gets sent over gossip so that nodes can discover which Regions are different between them.
The size and count data can also act as heuristics to help us fine-tune the gossip algorithm, although currently they are unused (except for the purpose of disambiguation in the rare case of an XOR hash collision).
Fields
hash: RegionHash
The XOR of hashes of all Ops in this Region
size: u32
The total size of Op data contains in this Region
count: u32
The number of Ops in this Region.
Trait Implementations
sourceimpl AccessOpStore<OpData, RegionData> for TestNode
impl AccessOpStore<OpData, RegionData> for TestNode
sourcefn query_op_data(&self, region: &RegionCoords) -> Vec<Op>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn query_op_data(&self, region: &RegionCoords) -> Vec<Op>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Query the actual ops inside a region
sourcefn 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
sourcefn 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
sourcefn 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
sourcefn gossip_params(&self) -> GossipParams
fn gossip_params(&self) -> GossipParams
Get the GossipParams associated with this store
sourcefn integrate_op(&mut self, op: Arc<O>)
fn integrate_op(&mut self, op: Arc<O>)
Integrate a single op
sourcefn region_set(&self, arq_set: ArqBoundsSet, now: TimeQuantum) -> RegionSet<D>
fn region_set(&self, arq_set: ArqBoundsSet, now: TimeQuantum) -> RegionSet<D>
Get the RegionSet for this node, suitable for gossiping
sourceimpl Add<RegionData> for RegionData
impl Add<RegionData> for RegionData
sourceimpl AddAssign<RegionData> for RegionData
impl AddAssign<RegionData> for RegionData
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the +=
operation. Read more
sourceimpl Clone for RegionData
impl Clone for RegionData
sourcefn clone(&self) -> RegionData
fn clone(&self) -> RegionData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RegionData
impl Debug for RegionData
sourceimpl<'de> Deserialize<'de> for RegionData
impl<'de> Deserialize<'de> for RegionData
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<RegionData> for RegionDataCompact
impl From<RegionData> for RegionDataCompact
sourcefn from(d: RegionData) -> Self
fn from(d: RegionData) -> Self
Converts to this type from the input type.
sourceimpl From<RegionDataCompact> for RegionData
impl From<RegionDataCompact> for RegionData
sourcefn from(RegionDataCompact: RegionDataCompact) -> Self
fn from(RegionDataCompact: RegionDataCompact) -> Self
Converts to this type from the input type.
sourceimpl OpRegion<RegionData> for OpData
impl OpRegion<RegionData> for OpData
sourcefn 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. Read more
sourcefn 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. Read more
sourcefn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords
The quantized space and time coordinates, based on the location and timestamp.
sourceimpl PartialEq<RegionData> for RegionData
impl PartialEq<RegionData> for RegionData
sourcefn eq(&self, other: &RegionData) -> bool
fn eq(&self, other: &RegionData) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RegionData) -> bool
fn ne(&self, other: &RegionData) -> bool
This method tests for !=
.
sourceimpl Serialize for RegionData
impl Serialize for RegionData
sourceimpl Sub<RegionData> for RegionData
impl Sub<RegionData> for RegionData
sourceimpl SubAssign<RegionData> for RegionData
impl SubAssign<RegionData> for RegionData
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the -=
operation. Read more
sourceimpl Sum<RegionData> for RegionData
impl Sum<RegionData> for RegionData
sourceimpl Zero for RegionData
impl Zero for RegionData
impl Eq for RegionData
impl StructuralEq for RegionData
impl StructuralPartialEq for RegionData
Auto Trait Implementations
impl RefUnwindSafe for RegionData
impl Send for RegionData
impl Sync for RegionData
impl Unpin for RegionData
impl UnwindSafe for RegionData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
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 more
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).
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.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more