Struct kitsune_p2p_dht::region::RegionCoords
source · [−]pub struct RegionCoords {
pub space: SpaceSegment,
pub time: TimeSegment,
}
Expand description
The cross product of a space segment and at time segment forms a Region. Hence, these two segments are the coordinates which define a Region of spacetime.
Fields
space: SpaceSegment
The space segment
time: TimeSegment
The time segment
Implementations
sourceimpl RegionCoords
impl RegionCoords
pub fn new(space: SpaceSegment, time: TimeSegment) -> RegionCoords
sourceimpl RegionCoords
impl RegionCoords
sourcepub fn to_bounds(&self, topo: &Topology) -> RegionBounds
pub fn to_bounds(&self, topo: &Topology) -> RegionBounds
Map the quantized coordinates into the actual Timestamp and DhtLocation bounds specifying the region
sourcepub fn contains(&self, topo: &Topology, coords: &SpacetimeQuantumCoords) -> bool
pub fn contains(&self, topo: &Topology, coords: &SpacetimeQuantumCoords) -> bool
Does the region contain this spacetime quantum?
sourcepub fn quadrisect(self) -> Option<Vec<Self>>
pub fn quadrisect(self) -> Option<Vec<Self>>
Split this region into 4 equal subregions, if possible. If one dimension is quantum, bisect the non-quantum dimension. If both dimensions are quantum, return None.
Trait Implementations
sourceimpl Clone for RegionCoords
impl Clone for RegionCoords
sourcefn clone(&self) -> RegionCoords
fn clone(&self) -> RegionCoords
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 RegionCoords
impl Debug for RegionCoords
sourceimpl Hash for RegionCoords
impl Hash for RegionCoords
sourceimpl PartialEq<RegionCoords> for RegionCoords
impl PartialEq<RegionCoords> for RegionCoords
sourcefn eq(&self, other: &RegionCoords) -> bool
fn eq(&self, other: &RegionCoords) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RegionCoords) -> bool
fn ne(&self, other: &RegionCoords) -> bool
This method tests for !=
.
impl Copy for RegionCoords
impl Eq for RegionCoords
impl StructuralEq for RegionCoords
impl StructuralPartialEq for RegionCoords
Auto Trait Implementations
impl RefUnwindSafe for RegionCoords
impl Send for RegionCoords
impl Sync for RegionCoords
impl Unpin for RegionCoords
impl UnwindSafe for RegionCoords
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