openthread::ot

Trait Thread

Source
pub trait Thread {
Show 28 methods // Required methods fn become_leader(&self) -> Result; fn become_router(&self) -> Result; fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>; fn get_leader_data(&self) -> Result<LeaderData>; fn get_leader_weight(&self) -> u8; fn get_network_key(&self) -> NetworkKey; fn set_network_key(&self, key: &NetworkKey) -> Result; fn get_network_name_as_slice(&self) -> &[u8] ; fn set_network_name(&self, name: &NetworkName) -> Result; fn is_singleton(&self) -> bool; fn get_extended_pan_id(&self) -> &ExtendedPanId; fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result; fn thread_set_enabled(&self, enabled: bool) -> Result; fn get_device_role(&self) -> DeviceRole; fn get_partition_id(&self) -> u32; fn get_rloc16(&self) -> u16; fn get_link_mode(&self) -> LinkModeConfig; fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result; fn get_rloc(&self) -> Ipv6Addr; fn get_mesh_local_eid(&self) -> Ipv6Addr; fn get_link_local_addr(&self) -> Ipv6Addr; fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr; fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix; fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>; fn get_ip6_counters(&self) -> &IpCounters; fn iter_next_neighbor_info( &self, ot_iter: &mut otNeighborInfoIterator, ) -> Option<NeighborInfo>; // Provided methods fn get_network_name(&self) -> NetworkName { ... } fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> { ... }
}
Expand description

Required Methods§

Source

fn become_leader(&self) -> Result

Functional equivalent of otsys::otThreadBecomeLeader.

Source

fn become_router(&self) -> Result

Functional equivalent of otsys::otThreadBecomeRouter.

Source

fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>

Functional equivalent of otsys::otThreadGetChildInfoById.

Source

fn get_leader_data(&self) -> Result<LeaderData>

Functional equivalent of otsys::otThreadGetLeaderData.

Source

fn get_leader_weight(&self) -> u8

Functional equivalent of otsys::otThreadGetLeaderWeight.

Source

fn get_network_key(&self) -> NetworkKey

Functional equivalent of otsys::otThreadGetNetworkKey.

Source

fn set_network_key(&self, key: &NetworkKey) -> Result

Functional equivalent of otsys::otThreadSetNetworkKey.

Source

fn get_network_name_as_slice(&self) -> &[u8]

Functional equivalent of otsys::otThreadGetNetworkName.

Source

fn set_network_name(&self, name: &NetworkName) -> Result

Functional equivalent of otsys::otThreadSetNetworkName.

Source

fn is_singleton(&self) -> bool

Functional equivalent of otsys::otThreadIsSingleton.

Source

fn get_extended_pan_id(&self) -> &ExtendedPanId

Functional equivalent of otsys::otThreadGetExtendedPanId.

Source

fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result

Functional equivalent of otsys::otThreadSetExtendedPanId.

Source

fn thread_set_enabled(&self, enabled: bool) -> Result

Functional equivalent of otsys::otThreadSetEnabled.

Source

fn get_device_role(&self) -> DeviceRole

Functional equivalent of otsys::otThreadGetDeviceRole.

Source

fn get_partition_id(&self) -> u32

Functional equivalent of otsys::otThreadGetPartitionId.

Source

fn get_rloc16(&self) -> u16

Functional equivalent of otsys::otThreadGetRloc16.

Functional equivalent of otsys::otThreadGetLinkMode.

Functional equivalent of otsys::otThreadSetLinkMode.

Source

fn get_rloc(&self) -> Ipv6Addr

Gets the full RLOC address.

Source

fn get_mesh_local_eid(&self) -> Ipv6Addr

Functional equivalent of otsys::otThreadGetMeshLocalEid.

Functional equivalent of otsys::otThreadGetLinkLocalIp6Address.

Source

fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix

Functional equivalent of otsys::otThreadGetMeshLocalPrefix.

Source

fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>

Fucntional equivalent of otsys::otThreadGetRouterInfo.

Source

fn get_ip6_counters(&self) -> &IpCounters

Functional equivalent of otsys::otThreadGetIp6Counters.

Source

fn iter_next_neighbor_info( &self, ot_iter: &mut otNeighborInfoIterator, ) -> Option<NeighborInfo>

Functional equivalent of otsys::otThreadGetNextNeighborInfo.

Provided Methods§

Source

fn get_network_name(&self) -> NetworkName

Similar to [get_network_name_as_slice], but returns an ot::NetworkName.

Source

fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self>

Returns an iterator for iterating over external routes.

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§