pub struct PeerSelector {
pub last_seen: (Option<SystemTime>, Option<SystemTime>),
pub quality: (Option<f64>, Option<f64>),
}
Fields§
§last_seen: (Option<SystemTime>, Option<SystemTime>)
Lower and upper bounds (both inclusive) on last seen timestamp.
quality: (Option<f64>, Option<f64>)
Lower and upper bounds (both inclusive) on peer quality.
Implementations§
Source§impl PeerSelector
impl PeerSelector
pub fn with_last_seen_gte(self, lower_bound: SystemTime) -> Self
pub fn with_last_seen_lte(self, upper_bound: SystemTime) -> Self
pub fn with_quality_gte(self, lower_bound: f64) -> Self
pub fn with_quality_lte(self, upper_bound: f64) -> Self
Trait Implementations§
Source§impl Clone for PeerSelector
impl Clone for PeerSelector
Source§fn clone(&self) -> PeerSelector
fn clone(&self) -> PeerSelector
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PeerSelector
impl Debug for PeerSelector
Source§impl Default for PeerSelector
impl Default for PeerSelector
Source§fn default() -> PeerSelector
fn default() -> PeerSelector
Returns the “default value” for a type. Read more
Source§impl PartialEq for PeerSelector
impl PartialEq for PeerSelector
impl Copy for PeerSelector
impl StructuralPartialEq for PeerSelector
Auto Trait Implementations§
impl Freeze for PeerSelector
impl RefUnwindSafe for PeerSelector
impl Send for PeerSelector
impl Sync for PeerSelector
impl Unpin for PeerSelector
impl UnwindSafe for PeerSelector
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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