pub struct BleStats {Show 14 fields
pub packets_sent: AtomicU64,
pub bytes_sent: AtomicU64,
pub packets_recv: AtomicU64,
pub bytes_recv: AtomicU64,
pub send_errors: AtomicU64,
pub recv_errors: AtomicU64,
pub mtu_exceeded: AtomicU64,
pub connections_established: AtomicU64,
pub connections_accepted: AtomicU64,
pub connections_rejected: AtomicU64,
pub connect_timeouts: AtomicU64,
pub pool_evictions: AtomicU64,
pub advertisements_sent: AtomicU64,
pub scan_results: AtomicU64,
}Expand description
Statistics for a BLE transport instance.
Uses atomic counters for lock-free updates from per-connection receive loops and the send path concurrently.
Fields§
§packets_sent: AtomicU64§bytes_sent: AtomicU64§packets_recv: AtomicU64§bytes_recv: AtomicU64§send_errors: AtomicU64§recv_errors: AtomicU64§mtu_exceeded: AtomicU64§connections_established: AtomicU64§connections_accepted: AtomicU64§connections_rejected: AtomicU64§connect_timeouts: AtomicU64§pool_evictions: AtomicU64§advertisements_sent: AtomicU64§scan_results: AtomicU64Implementations§
Source§impl BleStats
impl BleStats
Sourcepub fn record_send(&self, bytes: usize)
pub fn record_send(&self, bytes: usize)
Record a successful send.
Sourcepub fn record_recv(&self, bytes: usize)
pub fn record_recv(&self, bytes: usize)
Record a successful receive.
Sourcepub fn record_send_error(&self)
pub fn record_send_error(&self)
Record a send error.
Sourcepub fn record_recv_error(&self)
pub fn record_recv_error(&self)
Record a receive error.
Sourcepub fn record_mtu_exceeded(&self)
pub fn record_mtu_exceeded(&self)
Record an MTU exceeded rejection.
Sourcepub fn record_connection_established(&self)
pub fn record_connection_established(&self)
Record a successful outbound connection.
Sourcepub fn record_connection_accepted(&self)
pub fn record_connection_accepted(&self)
Record a successful inbound connection.
Sourcepub fn record_connection_rejected(&self)
pub fn record_connection_rejected(&self)
Record a rejected inbound connection (pool full).
Sourcepub fn record_connect_timeout(&self)
pub fn record_connect_timeout(&self)
Record a connect timeout.
Sourcepub fn record_pool_eviction(&self)
pub fn record_pool_eviction(&self)
Record a pool eviction (non-static peer displaced).
Sourcepub fn record_advertisement(&self)
pub fn record_advertisement(&self)
Record an advertisement broadcast.
Sourcepub fn record_scan_result(&self)
pub fn record_scan_result(&self)
Record a scan result received.
Sourcepub fn snapshot(&self) -> BleStatsSnapshot
pub fn snapshot(&self) -> BleStatsSnapshot
Take a snapshot of all counters.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BleStats
impl RefUnwindSafe for BleStats
impl Send for BleStats
impl Sync for BleStats
impl Unpin for BleStats
impl UnsafeUnpin for BleStats
impl UnwindSafe for BleStats
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> 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