openthread::ot

Trait NetData

Source
pub trait NetData {
    // Required methods
    fn net_data_get<'a>(
        &self,
        stable: bool,
        data: &'a mut [u8],
    ) -> Result<&'a [u8]>;
    fn net_data_get_version(&self) -> u8;
    fn net_data_get_stable_version(&self) -> u8;

    // Provided method
    fn net_data_as_vec(&self, stable: bool) -> Result<Vec<u8>> { ... }
}
Expand description

Required Methods§

Source

fn net_data_get<'a>(&self, stable: bool, data: &'a mut [u8]) -> Result<&'a [u8]>

Functional equivalent of otsys::otNetDataGet.

Source

fn net_data_get_version(&self) -> u8

Functional equivalent of otsys::otNetDataGetVersion.

Source

fn net_data_get_stable_version(&self) -> u8

Functional equivalent of otsys::otNetDataGetStableVersion.

Provided Methods§

Source

fn net_data_as_vec(&self, stable: bool) -> Result<Vec<u8>>

Same as [net_data_get], but returns the net data as a vector.

Implementors§