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 contained in this Region

§count: u32

The number of Ops in this Region.

Trait Implementations§

§

impl AccessOpStore<OpData, RegionData> for TestNode

§

fn query_op_data( &self, region: &RegionCoords ) -> Vec<Arc<OpData, Global>, Global>

Query the actual ops inside a region
§

fn query_region_data(&self, region: &RegionCoords) -> RegionData

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<RegionData>, ()>>

Fetch a set of Regions (the coords and the data) given the set of coords
§

fn integrate_ops<Ops>(&mut self, ops: Ops)where Ops: Clone + Iterator<Item = Arc<OpData, Global>>,

Integrate incoming ops, updating the necessary stores
§

fn topo(&self) -> &Topology

Get the Topology associated with this store
§

fn gossip_params(&self) -> GossipParams

Get the GossipParams associated with this store
§

fn integrate_op(&mut self, op: Arc<O, Global>)

Integrate a single op
§

fn region_set( &self, arq_set: ArqSet<SpaceOffset>, now: TimeQuantum ) -> RegionSet<D>

Get the RegionSet for this node, suitable for gossiping
§

impl Add<RegionData> for RegionData

§

type Output = RegionData

The resulting type after applying the + operator.
§

fn add(self, other: RegionData) -> <RegionData as Add<RegionData>>::Output

Performs the + operation. Read more
§

impl AddAssign<RegionData> for RegionData

§

fn add_assign(&mut self, other: RegionData)

Performs the += operation. Read more
§

impl Clone for RegionData

§

fn clone(&self) -> RegionData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RegionData

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for RegionData

§

fn deserialize<__D>( __deserializer: __D ) -> Result<RegionData, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
§

impl From<RegionData> for RegionDataCompact

§

fn from(d: RegionData) -> RegionDataCompact

Converts to this type from the input type.
§

impl From<RegionDataCompact> for RegionData

§

fn from(_: RegionDataCompact) -> RegionData

Converts to this type from the input type.
source§

impl OpRegion<RegionData> for DhtOp

source§

fn loc(&self) -> DhtLocation

The op’s Location
source§

fn timestamp(&self) -> Timestamp

The op’s Timestamp
source§

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: DhtLocation) -> DhtOp

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.
§

fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords

The quantized space and time coordinates, based on the location and timestamp.
§

impl OpRegion<RegionData> for OpData

§

fn loc(&self) -> DhtLocation

The op’s Location
§

fn timestamp(&self) -> Timestamp

The op’s Timestamp
§

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.
§

fn bound(timestamp: Timestamp, loc: DhtLocation) -> OpData

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.
§

fn coords(&self, topo: &Topology) -> SpacetimeQuantumCoords

The quantized space and time coordinates, based on the location and timestamp.
§

impl PartialEq<RegionData> for RegionData

§

fn eq(&self, other: &RegionData) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl RegionDataConstraints for RegionData

§

fn count(&self) -> u32

The number of ops in this region
§

fn size(&self) -> u32

The size of all ops in this region
§

impl Serialize for RegionData

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Sub<RegionData> for RegionData

§

type Output = RegionData

The resulting type after applying the - operator.
§

fn sub(self, other: RegionData) -> <RegionData as Sub<RegionData>>::Output

Performs the - operation. Read more
§

impl SubAssign<RegionData> for RegionData

§

fn sub_assign(&mut self, other: RegionData)

Performs the -= operation. Read more
§

impl Sum<RegionData> for RegionData

§

fn sum<I>(iter: I) -> RegionDatawhere I: Iterator<Item = RegionData>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
§

impl Zero for RegionData

§

fn zero() -> RegionData

Returns the additive identity element of Self, 0. Read more
§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
§

impl Eq for RegionData

§

impl StructuralEq for RegionData

§

impl StructuralPartialEq for RegionData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Any for Twhere T: Any,

§

fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>

§

fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for Twhere T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T, Global>) -> Arc<dyn Any + Sync + Send, Global>

§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,

§

fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>

Deserializes using the given deserializer
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
§

fn upcast_any_box(self: Box<T, Global>) -> Box<dyn Any, Global>

upcast boxed dyn
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T, Right> ClosedAdd<Right> for Twhere T: Add<Right, Output = T> + AddAssign<Right>,

§

impl<T, Right> ClosedSub<Right> for Twhere T: Sub<Right, Output = T> + SubAssign<Right>,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,

source§

impl<T> Scalar for Twhere T: 'static + Clone + PartialEq<T> + Debug,

§

impl<T> State for Twhere T: Debug + Clone + Send + Sync,