pub struct TraceSignalEntry(/* private fields */);Expand description
One trace-signal entry: negative RSSI in dBm, then SNR in centibels (packet-options.md § Trace Signal).
Every hop that prepends a router hint to a trace route prepends one of
these to the trace signal, so entry N is the quality at which the hop
named by hint N heard the packet. That pairing is the option’s whole
value, which is why the encoding lives here rather than in whichever
forwarder happens to need it: a repeater and a bridge that disagree
about a byte produce a list nothing downstream can read.
Both fields saturate rather than wrap, so a reading past the end of the range reports the nearest representable value instead of a plausible-looking wrong one.
Implementations§
Source§impl TraceSignalEntry
impl TraceSignalEntry
Sourcepub const UNMEASURED: Self
pub const UNMEASURED: Self
What a hop writes when its radio reported no measurement at all.
An RSSI byte of zero is 0 dBm at the receiver, which no link this protocol runs over produces, so it cannot be mistaken for a reading. Writing it keeps the entry-for-entry pairing with the trace route intact, which a hop that measures nothing is still obliged to maintain.
Sourcepub const fn new(rssi_dbm: i16, snr_centibels: i16) -> Self
pub const fn new(rssi_dbm: i16, snr_centibels: i16) -> Self
The entry for a hop that measured both fields.
Trait Implementations§
Source§impl Clone for TraceSignalEntry
impl Clone for TraceSignalEntry
Source§fn clone(&self) -> TraceSignalEntry
fn clone(&self) -> TraceSignalEntry
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TraceSignalEntry
impl Debug for TraceSignalEntry
Source§impl Default for TraceSignalEntry
impl Default for TraceSignalEntry
Source§fn default() -> TraceSignalEntry
fn default() -> TraceSignalEntry
Source§impl PartialEq for TraceSignalEntry
impl PartialEq for TraceSignalEntry
impl Copy for TraceSignalEntry
impl Eq for TraceSignalEntry
impl StructuralPartialEq for TraceSignalEntry
Auto Trait Implementations§
impl Freeze for TraceSignalEntry
impl RefUnwindSafe for TraceSignalEntry
impl Send for TraceSignalEntry
impl Sync for TraceSignalEntry
impl Unpin for TraceSignalEntry
impl UnwindSafe for TraceSignalEntry
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)