Enum tet_libp2p_swarm::AddressScore[][src]

pub enum AddressScore {
    Infinite,
    Finite(u32),
}

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

Infinite

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 Infinitely 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.

impl Clone for AddressScore[src]

impl Copy for AddressScore[src]

impl Debug for AddressScore[src]

impl Eq for AddressScore[src]

impl Hash for AddressScore[src]

impl Ord for AddressScore[src]

impl PartialEq<AddressScore> for AddressScore[src]

impl PartialOrd<AddressScore> for AddressScore[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.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,