Enum holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dht::prelude::RegionSet
pub enum RegionSet<T = RegionData>where
T: RegionDataConstraints,{
Ltcs(RegionSetLtcs<T>),
}
Expand description
The generic definition of a set of Regions.
The current representation is very specific to our current algorithm,
but this is an enum to make room for a more generic representation, e.g.
a simple Vec
Variants
Ltcs(RegionSetLtcs<T>)
Logarithmic Time, Constant Space.
Implementations
impl<D> RegionSet<D>where
D: RegionDataConstraints,
impl<D> RegionSet<D>where
D: RegionDataConstraints,
pub fn query(&self, _bounds: &RegionBounds) -> !
pub fn query(&self, _bounds: &RegionBounds) -> !
The RegionSet can be used to answer questions about more regions than just the ones specified: If a larger region is queried, and this set contains a set of regions which over that larger region, then the larger region can be dynamically constructed.
This allows agents with differently computed RegionSets to still engage in gossip without needing to recompute regions.
pub fn update(&self, _c: SpacetimeQuantumCoords, _d: D) -> !
pub fn update(&self, _c: SpacetimeQuantumCoords, _d: D) -> !
In order for this RegionSet to be queryable, new data needs to be integrated into it to avoid needing to recompute it from the database on each query.
impl RegionSet<RegionData>
impl RegionSet<RegionData>
pub fn nonzero_regions(
&self
) -> impl Iterator<Item = ((usize, usize, usize), RegionCoords, RegionData)>
pub fn nonzero_regions(
&self
) -> impl Iterator<Item = ((usize, usize, usize), RegionCoords, RegionData)>
Return only the regions which have ops in them. Useful for testing sparse scenarios.
Trait Implementations
impl<T> Clone for RegionSet<T>where
T: Clone + RegionDataConstraints,
impl<T> Clone for RegionSet<T>where
T: Clone + RegionDataConstraints,
impl<T> Debug for RegionSet<T>where
T: Debug + RegionDataConstraints,
impl<T> Debug for RegionSet<T>where
T: Debug + RegionDataConstraints,
impl<T> From<RegionSetLtcs<T>> for RegionSet<T>where
T: RegionDataConstraints,
impl<T> From<RegionSetLtcs<T>> for RegionSet<T>where
T: RegionDataConstraints,
fn from(original: RegionSetLtcs<T>) -> RegionSet<T>
fn from(original: RegionSetLtcs<T>) -> RegionSet<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for RegionSet<T>where
T: RefUnwindSafe,
impl<T> Send for RegionSet<T>
impl<T> Sync for RegionSet<T>
impl<T> Unpin for RegionSet<T>where
T: Unpin,
impl<T> UnwindSafe for RegionSet<T>where
T: UnwindSafe,
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
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>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.