Struct kitsune_p2p_dht::region::Region
source · pub struct Region<D: RegionDataConstraints = RegionData> {
pub coords: RegionCoords,
pub data: D,
}
Expand description
The coordinates defining the Region, along with the calculated RegionData
Fields§
§coords: RegionCoords
The coords
data: D
The data
Implementations§
source§impl<D: RegionDataConstraints> Region<D>
impl<D: RegionDataConstraints> Region<D>
pub fn new(coords: RegionCoords, data: D) -> Region<D>
Trait Implementations§
source§impl<D: PartialEq + RegionDataConstraints> PartialEq for Region<D>
impl<D: PartialEq + RegionDataConstraints> PartialEq for Region<D>
impl<D: Eq + RegionDataConstraints> Eq for Region<D>
impl<D: RegionDataConstraints> StructuralPartialEq for Region<D>
Auto Trait Implementations§
impl<D> Freeze for Region<D>
impl<D> RefUnwindSafe for Region<D>where
D: DeserializeOwned + for<'de> Deserialize<'de> + Serialize + Debug + Sync + Send + Clone + Sub<Output = D> + AddAssign + Zero<Output = D> + Add + Eq + PartialEq + RefUnwindSafe,
impl<D> Send for Region<D>
impl<D> Sync for Region<D>
impl<D> Unpin for Region<D>
impl<D> UnwindSafe for Region<D>where
D: DeserializeOwned + for<'de> Deserialize<'de> + Serialize + Debug + Sync + Send + Clone + Sub<Output = D> + AddAssign + Zero<Output = D> + Add + Eq + PartialEq + UnwindSafe,
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.