pub struct AdoptionReport {
pub collection: String,
pub observations: Vec<AdoptionObservation>,
pub failures: Vec<RelayFailure>,
}Expand description
The outcome of one probe run across every configured relay.
Partial success is a real outcome (one relay up, one down), which a single
Result<AdoptionObservation> cannot express — so this is not a Result, and
the caller needs no error handling beyond succeeded.
Fields§
§collection: StringThe collection that was counted.
observations: Vec<AdoptionObservation>One observation per host that answered, in configured order.
failures: Vec<RelayFailure>One entry per host that did not answer, in configured order.
Implementations§
Source§impl AdoptionReport
impl AdoptionReport
Sourcepub fn succeeded(&self) -> bool
pub fn succeeded(&self) -> bool
Whether any relay answered at all. A run where nothing answered leaves the previous stored observation in place.
Sourcepub fn best(&self) -> Option<&AdoptionObservation>
pub fn best(&self) -> Option<&AdoptionObservation>
The observation to surface: the highest count, ties resolved to the first configured host. Deterministic, so two instances with the same config log the same number.
Trait Implementations§
Source§impl Clone for AdoptionReport
impl Clone for AdoptionReport
Source§impl Debug for AdoptionReport
impl Debug for AdoptionReport
impl Eq for AdoptionReport
Source§impl PartialEq for AdoptionReport
impl PartialEq for AdoptionReport
impl StructuralPartialEq for AdoptionReport
Auto Trait Implementations§
impl Freeze for AdoptionReport
impl RefUnwindSafe for AdoptionReport
impl Send for AdoptionReport
impl Sync for AdoptionReport
impl Unpin for AdoptionReport
impl UnsafeUnpin for AdoptionReport
impl UnwindSafe for AdoptionReport
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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