pub struct PrivateInterest<const MCL: usize, const MCC: usize, const MPL: usize, N, S> { /* private fields */ }Expand description
Confidential data that relates to determining the AreaOfInterest that peers might be interested in synchronising.
Implementations§
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> PrivateInterest<MCL, MCC, MPL, N, S>
Sourcepub fn new(
namespace_id: N,
subspace_id: Option<S>,
path: Path<MCL, MCC, MPL>,
) -> Self
pub fn new( namespace_id: N, subspace_id: Option<S>, path: Path<MCL, MCC, MPL>, ) -> Self
Returns a new PrivateInterest with the gives attributes.
Sourcepub fn namespace(&self) -> &N
pub fn namespace(&self) -> &N
Returns the Namespace ID of this PrivateInterest.
Sourcepub fn subspace(&self) -> Option<&S>
pub fn subspace(&self) -> Option<&S>
Returns the specific SubspaceId of this PrivateInterest, if present. None denotes interest in all subspaces of the namespace.
Sourcepub fn path(&self) -> &Path<MCL, MCC, MPL>
pub fn path(&self) -> &Path<MCL, MCC, MPL>
Returns the path of this PrivateInterest.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
Sourcepub fn is_more_specific(&self, other: &Self) -> bool
pub fn is_more_specific(&self, other: &Self) -> bool
Returns true is this PrivateInterest is more specific than other.
Sourcepub fn is_disjoint(&self, other: &Self) -> bool
pub fn is_disjoint(&self, other: &Self) -> bool
Returns true is this PrivateInterest is disjoint from other, namely that there is no Entry which can be included in both.
Sourcepub fn is_less_specific(&self, other: &Self) -> bool
pub fn is_less_specific(&self, other: &Self) -> bool
Returns true is this PrivateInterest is less specific than other.
Sourcepub fn is_comparable(&self, other: &Self) -> bool
pub fn is_comparable(&self, other: &Self) -> bool
Returns true is this PrivateInterest is comparable to other.
Sourcepub fn are_awkward(&self, other: &Self) -> bool
pub fn are_awkward(&self, other: &Self) -> bool
Returns true if self and other are awkward, meaning they are neither comparable nor disjoint.
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S: PartialEq + Clone> PrivateInterest<MCL, MCC, MPL, N, S>
Sourcepub fn includes_area(&self, area: &Area<MCL, MCC, MPL, S>) -> bool
pub fn includes_area(&self, area: &Area<MCL, MCC, MPL, S>) -> bool
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S: PartialEq> PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S: PartialEq> PrivateInterest<MCL, MCC, MPL, N, S>
Sourcepub fn almost_includes_area(&self, area: &Area<MCL, MCC, MPL, S>) -> bool
pub fn almost_includes_area(&self, area: &Area<MCL, MCC, MPL, S>) -> bool
Returns true if self almost includes the given Area.
Trait Implementations§
Source§impl<'arbitrary, const MCL: usize, const MCC: usize, const MPL: usize, N: Arbitrary<'arbitrary>, S: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for PrivateInterest<MCL, MCC, MPL, N, S>
impl<'arbitrary, const MCL: usize, const MCC: usize, const MPL: usize, N: Arbitrary<'arbitrary>, S: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for PrivateInterest<MCL, MCC, MPL, N, S>
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Clone, S: Clone> Clone for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Clone, S: Clone> Clone for PrivateInterest<MCL, MCC, MPL, N, S>
Source§fn clone(&self) -> PrivateInterest<MCL, MCC, MPL, N, S>
fn clone(&self) -> PrivateInterest<MCL, MCC, MPL, N, S>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Debug, S: Debug> Debug for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Debug, S: Debug> Debug for PrivateInterest<MCL, MCC, MPL, N, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Hash, S: Hash> Hash for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Hash, S: Hash> Hash for PrivateInterest<MCL, MCC, MPL, N, S>
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Ord, S: Ord> Ord for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Ord, S: Ord> Ord for PrivateInterest<MCL, MCC, MPL, N, S>
Source§fn cmp(&self, other: &PrivateInterest<MCL, MCC, MPL, N, S>) -> Ordering
fn cmp(&self, other: &PrivateInterest<MCL, MCC, MPL, N, S>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq> PartialEq for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialEq, S: PartialEq> PartialEq for PrivateInterest<MCL, MCC, MPL, N, S>
Source§fn eq(&self, other: &PrivateInterest<MCL, MCC, MPL, N, S>) -> bool
fn eq(&self, other: &PrivateInterest<MCL, MCC, MPL, N, S>) -> bool
self and other values to be equal, and is used by ==.Source§impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialOrd, S: PartialOrd> PartialOrd for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: PartialOrd, S: PartialOrd> PartialOrd for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N: Eq, S: Eq> Eq for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> StructuralPartialEq for PrivateInterest<MCL, MCC, MPL, N, S>
Auto Trait Implementations§
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> !Freeze for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> RefUnwindSafe for PrivateInterest<MCL, MCC, MPL, N, S>where
N: RefUnwindSafe,
S: RefUnwindSafe,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> Send for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> Sync for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> Unpin for PrivateInterest<MCL, MCC, MPL, N, S>
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> UnsafeUnpin for PrivateInterest<MCL, MCC, MPL, N, S>where
N: UnsafeUnpin,
S: UnsafeUnpin,
impl<const MCL: usize, const MCC: usize, const MPL: usize, N, S> UnwindSafe for PrivateInterest<MCL, MCC, MPL, N, S>where
N: UnwindSafe,
S: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more