#[repr(transparent)]pub struct TrelCounters(pub otTrelCounters);
Expand description
This structure represents the Thread TREL counters.
Functional equivalent of otsys::otTrelCounters
.
Tuple Fields§
§0: otTrelCounters
Implementations§
Source§impl TrelCounters
impl TrelCounters
Sourcepub fn get_tx_packets(&self) -> u64
pub fn get_tx_packets(&self) -> u64
Get TREL tx packet counter
Sourcepub fn get_tx_bytes(&self) -> u64
pub fn get_tx_bytes(&self) -> u64
Get TREL tx bytes counter
Sourcepub fn get_tx_failure(&self) -> u64
pub fn get_tx_failure(&self) -> u64
Get TREL tx failure counter
Sourcepub fn get_rx_packets(&self) -> u64
pub fn get_rx_packets(&self) -> u64
Get TREL rx packet counter
Sourcepub fn get_rx_bytes(&self) -> u64
pub fn get_rx_bytes(&self) -> u64
Get TREL rx bytes counter
Sourcepub fn update_tx_packets(&mut self, cnt: u64)
pub fn update_tx_packets(&mut self, cnt: u64)
Update TREL tx packet counter by cnt
Sourcepub fn update_tx_bytes(&mut self, cnt: u64)
pub fn update_tx_bytes(&mut self, cnt: u64)
Update TREL tx bytes counter by cnt
Sourcepub fn update_tx_failure(&mut self, cnt: u64)
pub fn update_tx_failure(&mut self, cnt: u64)
Update TREL tx failure counter by cnt
Sourcepub fn update_rx_packets(&mut self, cnt: u64)
pub fn update_rx_packets(&mut self, cnt: u64)
Update TREL rx packet counter by cnt
Sourcepub fn update_rx_bytes(&mut self, cnt: u64)
pub fn update_rx_bytes(&mut self, cnt: u64)
Update TREL rx bytes counter by cnt
Sourcepub fn reset_counters(&mut self)
pub fn reset_counters(&mut self)
Reset all counters
Trait Implementations§
Source§impl Clone for TrelCounters
impl Clone for TrelCounters
Source§fn clone(&self) -> TrelCounters
fn clone(&self) -> TrelCounters
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TrelCounters
impl Debug for TrelCounters
Source§impl Default for TrelCounters
impl Default for TrelCounters
Source§fn default() -> TrelCounters
fn default() -> TrelCounters
Returns the “default value” for a type. Read more
Source§impl<'a> From<&'a TrelCounters> for &'a otTrelCounters
impl<'a> From<&'a TrelCounters> for &'a otTrelCounters
Source§fn from(x: &'a TrelCounters) -> Self
fn from(x: &'a TrelCounters) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a otPlatTrelCounters> for &'a TrelCounters
impl<'a> From<&'a otPlatTrelCounters> for &'a TrelCounters
Source§impl From<TrelCounters> for otTrelCounters
impl From<TrelCounters> for otTrelCounters
Source§fn from(x: TrelCounters) -> Self
fn from(x: TrelCounters) -> Self
Converts to this type from the input type.
Source§impl From<otPlatTrelCounters> for TrelCounters
impl From<otPlatTrelCounters> for TrelCounters
Source§impl OtCastable for TrelCounters
impl OtCastable for TrelCounters
Source§fn as_ot_ptr(&self) -> *const Self::OtType
fn as_ot_ptr(&self) -> *const Self::OtType
Returns a pointer to the underlying
Self::OtType
instance.Source§fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
fn as_ot_mut_ptr(&mut self) -> *mut Self::OtType
Returns a mutable pointer to the underlying
Self::OtType
instance.Source§unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
unsafe fn ref_from_ot_ptr<'a>(ptr: *const Self::OtType) -> Option<&'a Self>
Creates a reference from a pointer to an
Self::OtType
. Read moreSource§unsafe fn mut_from_ot_mut_ptr<'a>(
ptr: *mut Self::OtType,
) -> Option<&'a mut Self>
unsafe fn mut_from_ot_mut_ptr<'a>( ptr: *mut Self::OtType, ) -> Option<&'a mut Self>
Creates a mut reference from a mut pointer to an
Self::OtType
. Read moreSource§fn as_ot_ref(&self) -> &Self::OtType
fn as_ot_ref(&self) -> &Self::OtType
Returns a reference to the original OpenThread type
Self::OtType
.Source§fn as_ot_mut(&mut self) -> &mut Self::OtType
fn as_ot_mut(&mut self) -> &mut Self::OtType
Returns a mutable reference to the original OpenThread type
Self::OtType
.Source§fn ref_from_ot_ref(x: &Self::OtType) -> &Self
fn ref_from_ot_ref(x: &Self::OtType) -> &Self
Casts a reference to the original OpenThread type to a reference to
Self
.Auto Trait Implementations§
impl Freeze for TrelCounters
impl RefUnwindSafe for TrelCounters
impl Send for TrelCounters
impl Sync for TrelCounters
impl Unpin for TrelCounters
impl UnwindSafe for TrelCounters
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)