pub struct DeviceCounters<C: CounterRepr = Counter> {Show 14 fields
pub send_total_frames: C,
pub send_frame: C,
pub send_bytes: C,
pub send_queue_full: C,
pub send_serialize_error: C,
pub recv_frame: C,
pub recv_bytes: C,
pub recv_parse_error: C,
pub recv_ipv4_delivered: C,
pub recv_ipv6_delivered: C,
pub send_ipv4_frame: C,
pub send_ipv6_frame: C,
pub send_dropped_no_queue: C,
pub send_dropped_dequeue: C,
}Expand description
Device layer counters.
Fields§
§send_total_frames: CCount of outgoing frames which enter the device layer (but may or may not have been dropped prior to reaching the wire).
send_frame: CCount of frames sent.
send_bytes: CCount of bytes sent.
send_queue_full: CCount of frames that failed to send because of a full Tx queue.
send_serialize_error: CCount of frames that failed to send because of a serialization error.
recv_frame: CCount of frames received.
recv_bytes: CCount of bytes received.
recv_parse_error: CCount of incoming frames dropped due to a parsing error.
recv_ipv4_delivered: CCount of incoming frames containing an IPv4 packet delivered.
recv_ipv6_delivered: CCount of incoming frames containing an IPv6 packet delivered.
send_ipv4_frame: CCount of sent frames containing an IPv4 packet.
send_ipv6_frame: CCount of sent frames containing an IPv6 packet.
send_dropped_no_queue: CCount of frames that failed to send because there was no Tx queue.
send_dropped_dequeue: CCount of frames that were dropped during Tx queue dequeuing.
Implementations§
Source§impl DeviceCounters<u64>
impl DeviceCounters<u64>
Sourcepub fn assert_counters<D, CC: ResourceCounterContext<D, DeviceCounters>>(
&self,
core_ctx: &CC,
device: &D,
)
pub fn assert_counters<D, CC: ResourceCounterContext<D, DeviceCounters>>( &self, core_ctx: &CC, device: &D, )
Assert that the counters tracked by core_ctx match expectations.
Source§impl DeviceCounters
impl DeviceCounters
Sourcepub fn send_frame<I: Ip>(&self) -> &Counter
pub fn send_frame<I: Ip>(&self) -> &Counter
Either send_ipv4_frame or send_ipv6_frame depending on I.
Trait Implementations§
Source§impl<C: CounterRepr + CounterRepr> CounterCollection for DeviceCounters<C>
impl<C: CounterRepr + CounterRepr> CounterCollection for DeviceCounters<C>
Source§type Spec = DeviceCounters
type Spec = DeviceCounters
CounterCollectionSpec associated with this collection.Source§fn cast<C>(&self) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C>where
C: CounterRepr,
fn cast<C>(&self) -> <Self::Spec as CounterCollectionSpec>::CounterCollection<C>where
C: CounterRepr,
Source§impl CounterCollectionSpec for DeviceCounters<Counter>
impl CounterCollectionSpec for DeviceCounters<Counter>
Source§type CounterCollection<C: CounterRepr> = DeviceCounters<C>
type CounterCollection<C: CounterRepr> = DeviceCounters<C>
CounterCollection for this specification.Source§fn transform<C1: CounterRepr, C2: CounterRepr>(
counters: &DeviceCounters<C1>,
) -> DeviceCounters<C2>
fn transform<C1: CounterRepr, C2: CounterRepr>( counters: &DeviceCounters<C1>, ) -> DeviceCounters<C2>
Self::CounterCollection.Source§impl<C: Debug + CounterRepr> Debug for DeviceCounters<C>
impl<C: Debug + CounterRepr> Debug for DeviceCounters<C>
Source§impl<C: Default + CounterRepr> Default for DeviceCounters<C>
impl<C: Default + CounterRepr> Default for DeviceCounters<C>
Source§fn default() -> DeviceCounters<C>
fn default() -> DeviceCounters<C>
Source§impl Inspectable for DeviceCounters
impl Inspectable for DeviceCounters
Source§impl<C: PartialEq + CounterRepr> PartialEq for DeviceCounters<C>
impl<C: PartialEq + CounterRepr> PartialEq for DeviceCounters<C>
impl<C: CounterRepr> StructuralPartialEq for DeviceCounters<C>
Auto Trait Implementations§
impl<C> Freeze for DeviceCounters<C>where
C: Freeze,
impl<C> RefUnwindSafe for DeviceCounters<C>where
C: RefUnwindSafe,
impl<C> Send for DeviceCounters<C>where
C: Send,
impl<C> Sync for DeviceCounters<C>where
C: Sync,
impl<C> Unpin for DeviceCounters<C>where
C: Unpin,
impl<C> UnwindSafe for DeviceCounters<C>where
C: UnwindSafe,
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
Source§impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
impl<O, BC> BuildableCoreContext<BC> for Owhere
O: Default,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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