Enum ipfs_embed::AddressScore
[−]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
impl Add<AddressScore> for AddressScore
impl Add<AddressScore> for AddressScore
type Output = AddressScore
type Output = AddressScore
The resulting type after applying the
+
operator.fn add(self, rhs: AddressScore) -> <AddressScore as Add<AddressScore>>::Output
fn add(self, rhs: AddressScore) -> <AddressScore as Add<AddressScore>>::Output
Performs the
+
operation. Read moreimpl Clone for AddressScore
impl Clone for AddressScore
fn clone(&self) -> AddressScore
fn clone(&self) -> AddressScore
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Debug for AddressScore
impl Debug for AddressScore
impl Hash for AddressScore
impl Hash for AddressScore
impl Ord for AddressScore
impl Ord for AddressScore
fn cmp(&self, other: &AddressScore) -> Ordering
fn cmp(&self, other: &AddressScore) -> Ordering
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialEq<AddressScore> for AddressScore
impl PartialEq<AddressScore> for AddressScore
fn eq(&self, other: &AddressScore) -> bool
fn eq(&self, other: &AddressScore) -> bool
impl PartialOrd<AddressScore> for AddressScore
impl PartialOrd<AddressScore> for AddressScore
fn partial_cmp(&self, other: &AddressScore) -> Option<Ordering>
fn partial_cmp(&self, other: &AddressScore) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Sub<u32> for AddressScore
impl Sub<u32> for AddressScore
type Output = AddressScore
type Output = AddressScore
The resulting type after applying the
-
operator.impl Copy for AddressScore
impl Eq for AddressScore
impl StructuralEq for AddressScore
impl StructuralPartialEq for AddressScore
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more