#[non_exhaustive]pub struct Metrics {
pub tx_sdus: u64,
pub tx_bytes: u64,
pub rx_sdus: u64,
pub rx_bytes: u64,
pub dropped: u64,
}Expand description
Counters a medium exposes for telemetry.
Deliberately minimal: these are the quantities the driver can assert on in a
test. Radio-specific figures such as RSSI belong on the management plane
(docs/architecture.md §4.6), not in the data-path interface.
#[non_exhaustive] since 0.3; built with Metrics::new and the
setters, or Default.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tx_sdus: u64SDUs handed to the medium and accepted.
tx_bytes: u64Bytes across those SDUs.
rx_sdus: u64SDUs delivered by the medium.
rx_bytes: u64Bytes across those SDUs.
dropped: u64SDUs the medium accepted and then lost, where it can tell.
A medium that cannot distinguish loss from delivery leaves this at zero; per the architecture’s telemetry rule, absence means unknown and must not be read as none.
Implementations§
Trait Implementations§
impl Copy for Metrics
impl Eq for Metrics
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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