Counter

Enum Counter 

Source
pub enum Counter {
    TxPackets,
    TxChannelBusy,
    RxPackets,
    RxBadCrc,
    RxNonUmsh,
    RxAccepted,
    Forwarded,
    ForwardDropped,
    ForwardCancelled,
}
Expand description

The counters a device keeps.

The discriminants are the ledger’s slot indices and are not on the wire; Counter::property gives the identifier that is.

Variants§

§

TxPackets

Frames that reached the air, from any client of the radio.

§

TxChannelBusy

Transmit attempts the channel-activity check held back.

§

RxPackets

Receptions off the air that are UMSH packets.

§

RxBadCrc

Receptions the radio rejected on CRC.

§

RxNonUmsh

Receptions that passed CRC and are not UMSH packets.

§

RxAccepted

Receptions the device’s own node acted on.

§

Forwarded

Receptions this node chose to repeat.

§

ForwardDropped

Receptions declined under the operator’s forwarding policy.

§

ForwardCancelled

Queued repeats dropped after overhearing the destination’s ack.

Implementations§

Source§

impl Counter

Source

pub const ALL: [Counter; 9]

Every counter, in identifier order.

Source

pub const fn property(self) -> u32

The property identifier this counter is read and cleared through.

Source

pub const fn from_property(key: u32) -> Option<Counter>

The counter a property identifier names, if it names one.

Source

pub const fn needs_node(self) -> bool

Whether this counter can only be answered by a device running a node of its own.

The four that come from the MAC. A session with nothing behind it does not have these properties at all, rather than reporting a zero that reads as “this repeater has never repeated anything”.

Trait Implementations§

Source§

impl Clone for Counter

Source§

fn clone(&self) -> Counter

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Counter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Counter

Source§

fn eq(&self, other: &Counter) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Counter

Source§

impl Eq for Counter

Source§

impl StructuralPartialEq for Counter

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.