pub struct Observations {
last_update: Duration,
immediate_probe: Option<TransportImmediates>,
intermediate_probe: Option<TransportIntermediates>,
}Expand description
Observations related to a specific peer in the network.
Fields§
§last_update: Duration§immediate_probe: Option<TransportImmediates>§intermediate_probe: Option<TransportIntermediates>Trait Implementations§
Source§impl Clone for Observations
impl Clone for Observations
Source§fn clone(&self) -> Observations
fn clone(&self) -> Observations
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 Observations
impl Debug for Observations
Source§impl Default for Observations
impl Default for Observations
Source§fn default() -> Observations
fn default() -> Observations
Returns the “default value” for a type. Read more
Source§impl EdgeObservableRead for Observations
impl EdgeObservableRead for Observations
Source§fn score(&self) -> f64
fn score(&self) -> f64
The score combines immediate and intermediate observations:
- When both are present, average their scores (immediate neighbor probes prevent an empty intermediate from masking real measurements).
- When only intermediate is present, use it directly.
- When only immediate is present, use it directly.
Source§type ImmediateMeasurement = TransportImmediates
type ImmediateMeasurement = TransportImmediates
Measurement type for direct (1-hop) probes, including network connectivity and protocol conformance info.
Source§type IntermediateMeasurement = TransportIntermediates
type IntermediateMeasurement = TransportIntermediates
Measurement type for relayed probes through an intermediate, including channel capacity.
Source§fn last_update(&self) -> Duration
fn last_update(&self) -> Duration
The timestamp of the last update.
Source§fn immediate_qos(&self) -> Option<&Self::ImmediateMeasurement>
fn immediate_qos(&self) -> Option<&Self::ImmediateMeasurement>
Transport level measurements between this node and any other node in the network.
Source§fn intermediate_qos(&self) -> Option<&Self::IntermediateMeasurement>
fn intermediate_qos(&self) -> Option<&Self::IntermediateMeasurement>
Transport level measurements performed in a transparent mode using looping measurements.
Source§impl EdgeObservableWrite for Observations
impl EdgeObservableWrite for Observations
Source§impl PartialEq for Observations
impl PartialEq for Observations
impl Copy for Observations
impl StructuralPartialEq for Observations
Auto Trait Implementations§
impl Freeze for Observations
impl RefUnwindSafe for Observations
impl Send for Observations
impl Sync for Observations
impl Unpin for Observations
impl UnwindSafe for Observations
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