Skip to main content

Trel

Trait Trel 

Source
pub trait Trel {
    // Required methods
    fn trel_set_enabled(&self, enabled: bool);
    fn trel_is_enabled(&self) -> bool;
    fn trel_get_counters(&self) -> Option<&TrelCounters>;
    fn trel_reset_counters(&self);
    fn trel_get_number_of_peers(&self) -> u16;
    fn trel_init_peer_iterator(&self, iter: &mut otTrelPeerIterator);
    fn iter_next_trel_peer(
        &self,
        ot_iter: &mut otTrelPeerIterator,
    ) -> Option<TrelPeer>;

    // Provided method
    fn trel_peer_get_iterator(&self) -> TrelPeerIterator<'_, Self>  { ... }
}
Expand description

Methods from the OpenThread TREL Module.

Required Methods§

Source

fn trel_set_enabled(&self, enabled: bool)

Enables or disables TREL operation.

Source

fn trel_is_enabled(&self) -> bool

Returns true if TREL is enabled.

Source

fn trel_get_counters(&self) -> Option<&TrelCounters>

Return all the TREL counters

Source

fn trel_reset_counters(&self)

Reset TREL counters

Source

fn trel_get_number_of_peers(&self) -> u16

Return the count of TREL peer

Source

fn trel_init_peer_iterator(&self, iter: &mut otTrelPeerIterator)

Functional equivalent of otsys::otTrelInitPeerIterator (crate::otsys::otTrelInitPeerIterator).

Source

fn iter_next_trel_peer( &self, ot_iter: &mut otTrelPeerIterator, ) -> Option<TrelPeer>

Functional equivalent of otsys::otTrelGetNextPeer.

Provided Methods§

Source

fn trel_peer_get_iterator(&self) -> TrelPeerIterator<'_, Self>

Get the trel peer iterator instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Trel for Instance

Source§

impl<T: Trel + Boxable> Trel for Box<T>