Enum libp2p::swarm::AddressScore [−][src]
The “score” of an address w.r.t. an ordered collection of addresses.
A score is a measure of the trusworthyness of a particular observation of an address. The same address may be repeatedly reported with the same or differing scores.
Variants
The score is “infinite”, i.e. an address with this score is never
purged from the associated address records and remains sorted at
the beginning (possibly with other Infinite
ly scored addresses).
Finite(u32)
The score is finite, i.e. an address with this score has its score increased and decreased as per the frequency of reports (i.e. additions) of the same address relative to the reports of other addresses.
Trait Implementations
impl Add<AddressScore> for AddressScore
[src]
type Output = AddressScore
The resulting type after applying the +
operator.
pub fn add(
self,
rhs: AddressScore
) -> <AddressScore as Add<AddressScore>>::Output
[src]
self,
rhs: AddressScore
) -> <AddressScore as Add<AddressScore>>::Output
impl Clone for AddressScore
[src]
pub fn clone(&self) -> AddressScore
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for AddressScore
[src]
impl Debug for AddressScore
[src]
impl Eq for AddressScore
[src]
impl Hash for AddressScore
[src]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for AddressScore
[src]
pub fn cmp(&self, other: &AddressScore) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<AddressScore> for AddressScore
[src]
pub fn eq(&self, other: &AddressScore) -> bool
[src]
pub fn ne(&self, other: &AddressScore) -> bool
[src]
impl PartialOrd<AddressScore> for AddressScore
[src]
pub fn partial_cmp(&self, other: &AddressScore) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for AddressScore
[src]
impl StructuralPartialEq for AddressScore
[src]
impl Sub<u32> for AddressScore
[src]
type Output = AddressScore
The resulting type after applying the -
operator.
pub fn sub(self, rhs: u32) -> <AddressScore as Sub<u32>>::Output
[src]
Auto Trait Implementations
impl RefUnwindSafe for AddressScore
impl Send for AddressScore
impl Sync for AddressScore
impl Unpin for AddressScore
impl UnwindSafe for AddressScore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash,
[src]
T: Hash,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,