Enum libp2p_swarm::AddressScore
source · [−]pub enum AddressScore {
Infinite,
Finite(u32),
}
Expand description
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 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
type Output = AddressScore
type Output = AddressScore
The resulting type after applying the +
operator.
Performs the +
operation. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
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
Mutably borrows from an owned value. Read more