pub struct Hop { /* private fields */ }Expand description
One router on the way to a host, at a known distance.
Implementations§
Source§impl Hop
impl Hop
Sourcepub fn answered(distance: u8, address: IpAddr, rtt: Option<Duration>) -> Self
pub fn answered(distance: u8, address: IpAddr, rtt: Option<Duration>) -> Self
A router that answered, at distance hops, in rtt.
Sourcepub fn silent(distance: u8) -> Self
pub fn silent(distance: u8) -> Self
A distance nothing answered at.
Recorded, since omitting it would make the path read shorter than it is.
Sourcepub fn withheld(distance: u8) -> Self
pub fn withheld(distance: u8) -> Self
A distance a router answered at, from an address the scan’s exclusions forbid it to report.
See the module documentation. Carries no round trip, which would be a fact about the router.
For reading a record back; a scan records a router as it answered and withholds the address afterwards.
Sourcepub fn as_inferred(self) -> Self
pub fn as_inferred(self) -> Self
The same hop, marked as taken from another host’s trace rather than
measured on this one. See inferred.
Sourcepub fn address(&self) -> Option<IpAddr>
pub fn address(&self) -> Option<IpAddr>
The address the router answered from, or None if nothing answered at
this distance or the address is withheld.
Sourcepub fn rtt(&self) -> Option<Duration>
pub fn rtt(&self) -> Option<Duration>
How long the probe that expired here took to be answered, measured from
this machine. None for a silent hop, an inferred one and a withheld
one.
Sourcepub fn is_withheld(&self) -> bool
pub fn is_withheld(&self) -> bool
Sourcepub fn inferred(&self) -> bool
pub fn inferred(&self) -> bool
Whether this hop was measured on the way to this host, or copied from an earlier trace that passed through the same router.
A spliced path assumes the two hosts share everything upstream of the router where the traces met, which is nearly always true but still an assumption.
Trait Implementations§
impl Copy for Hop
impl Eq for Hop
impl StructuralPartialEq for Hop
Auto Trait Implementations§
impl Freeze for Hop
impl RefUnwindSafe for Hop
impl Send for Hop
impl Sync for Hop
impl Unpin for Hop
impl UnsafeUnpin for Hop
impl UnwindSafe for Hop
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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