pub trait Thread {
Show 35 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_max_router_id(&self) -> u8;
fn get_ip6_counters(&self) -> &IpCounters;
fn iter_next_neighbor_info(
&self,
ot_iter: &mut otNeighborInfoIterator,
) -> Option<NeighborInfo>;
fn set_vendor_name(&self, name: &str) -> Result;
fn set_vendor_model(&self, model: &str) -> Result;
fn set_vendor_sw_version(&self, version: &str) -> Result;
fn get_mle_counters(&self) -> &MleCounters;
fn iter_next_cache_entry_info(
&self,
ot_iter: &mut otCacheEntryIterator,
) -> Option<CacheEntryInfo>;
// Provided methods
fn get_network_name(&self) -> NetworkName { ... }
fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ { ... }
fn iter_cache_entry_info(&self) -> CacheEntryIterator<'_, Self> ⓘ { ... }
}Expand description
Methods from the OpenThread “Thread General” Module.
Required Methods§
Sourcefn become_leader(&self) -> Result
fn become_leader(&self) -> Result
Functional equivalent of
otsys::otThreadBecomeLeader.
Sourcefn become_router(&self) -> Result
fn become_router(&self) -> Result
Functional equivalent of
otsys::otThreadBecomeRouter.
Sourcefn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
Functional equivalent of
otsys::otThreadGetChildInfoById.
Sourcefn get_leader_data(&self) -> Result<LeaderData>
fn get_leader_data(&self) -> Result<LeaderData>
Functional equivalent of
otsys::otThreadGetLeaderData.
Sourcefn get_leader_weight(&self) -> u8
fn get_leader_weight(&self) -> u8
Functional equivalent of
otsys::otThreadGetLeaderWeight.
Sourcefn get_network_key(&self) -> NetworkKey
fn get_network_key(&self) -> NetworkKey
Functional equivalent of
otsys::otThreadGetNetworkKey.
Sourcefn set_network_key(&self, key: &NetworkKey) -> Result
fn set_network_key(&self, key: &NetworkKey) -> Result
Functional equivalent of
otsys::otThreadSetNetworkKey.
Sourcefn get_network_name_as_slice(&self) -> &[u8] ⓘ
fn get_network_name_as_slice(&self) -> &[u8] ⓘ
Functional equivalent of
otsys::otThreadGetNetworkName.
Sourcefn set_network_name(&self, name: &NetworkName) -> Result
fn set_network_name(&self, name: &NetworkName) -> Result
Functional equivalent of
otsys::otThreadSetNetworkName.
Sourcefn is_singleton(&self) -> bool
fn is_singleton(&self) -> bool
Functional equivalent of
otsys::otThreadIsSingleton.
Sourcefn get_extended_pan_id(&self) -> &ExtendedPanId
fn get_extended_pan_id(&self) -> &ExtendedPanId
Functional equivalent of
otsys::otThreadGetExtendedPanId.
Sourcefn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
Functional equivalent of
otsys::otThreadSetExtendedPanId.
Sourcefn thread_set_enabled(&self, enabled: bool) -> Result
fn thread_set_enabled(&self, enabled: bool) -> Result
Functional equivalent of otsys::otThreadSetEnabled.
Sourcefn get_device_role(&self) -> DeviceRole
fn get_device_role(&self) -> DeviceRole
Functional equivalent of
otsys::otThreadGetDeviceRole.
Sourcefn get_partition_id(&self) -> u32
fn get_partition_id(&self) -> u32
Functional equivalent of
otsys::otThreadGetPartitionId.
Sourcefn get_rloc16(&self) -> u16
fn get_rloc16(&self) -> u16
Functional equivalent of otsys::otThreadGetRloc16.
Sourcefn get_link_mode(&self) -> LinkModeConfig
fn get_link_mode(&self) -> LinkModeConfig
Functional equivalent of otsys::otThreadGetLinkMode.
Sourcefn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
Functional equivalent of otsys::otThreadSetLinkMode.
Sourcefn get_mesh_local_eid(&self) -> Ipv6Addr
fn get_mesh_local_eid(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetMeshLocalEid.
Sourcefn get_link_local_addr(&self) -> Ipv6Addr
fn get_link_local_addr(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetLinkLocalIp6Address.
Sourcefn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
Functional equivalent of
otsys::otThreadGetLinkLocalAllThreadNodesMulticastAddress.
Sourcefn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
Functional equivalent of
otsys::otThreadGetMeshLocalPrefix.
Sourcefn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
Functional equivalent of
otsys::otThreadGetRouterInfo.
Sourcefn get_max_router_id(&self) -> u8
fn get_max_router_id(&self) -> u8
Functional equivalent of
otsys::otThreadGetMaxRouterId.
Sourcefn get_ip6_counters(&self) -> &IpCounters
fn get_ip6_counters(&self) -> &IpCounters
Functional equivalent of
otsys::otThreadGetIp6Counters.
Sourcefn iter_next_neighbor_info(
&self,
ot_iter: &mut otNeighborInfoIterator,
) -> Option<NeighborInfo>
fn iter_next_neighbor_info( &self, ot_iter: &mut otNeighborInfoIterator, ) -> Option<NeighborInfo>
Functional equivalent of
otsys::otThreadGetNextNeighborInfo.
Sourcefn set_vendor_name(&self, name: &str) -> Result
fn set_vendor_name(&self, name: &str) -> Result
Functional equivalent of
otsys::otThreadSetVendorName.
Sourcefn set_vendor_model(&self, model: &str) -> Result
fn set_vendor_model(&self, model: &str) -> Result
Functional equivalent of
otsys::otThreadSetVendorModel.
Sourcefn set_vendor_sw_version(&self, version: &str) -> Result
fn set_vendor_sw_version(&self, version: &str) -> Result
Functional equivalent of
otsys::otThreadSetVendorSwVersion.
Sourcefn get_mle_counters(&self) -> &MleCounters
fn get_mle_counters(&self) -> &MleCounters
Functional equivalent of
otsys::otThreadGetMleCounters.
Sourcefn iter_next_cache_entry_info(
&self,
ot_iter: &mut otCacheEntryIterator,
) -> Option<CacheEntryInfo>
fn iter_next_cache_entry_info( &self, ot_iter: &mut otCacheEntryIterator, ) -> Option<CacheEntryInfo>
Provided Methods§
Sourcefn get_network_name(&self) -> NetworkName
fn get_network_name(&self) -> NetworkName
Similar to [get_network_name_as_slice], but returns
an ot::NetworkName.
Sourcefn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
Returns an iterator for iterating over external routes.
Sourcefn iter_cache_entry_info(&self) -> CacheEntryIterator<'_, Self> ⓘ
fn iter_cache_entry_info(&self) -> CacheEntryIterator<'_, Self> ⓘ
Returns an iterator for iterating through the EID cache table entries.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".