pub struct Box<T: Boxable>(/* private fields */);Expand description
A box for owning pointers to opaque types vended from the OpenThread API.
May be abbreviated as an OtBox to avoid confusion with std::boxed::Box.
Internally, an ot::Box contains the raw pointer to the underlying
OpenThread object. Externally, the box appears to contain an instance
of a type implementing ot::Boxable. References to the
ot::Boxable type are created from the underlying pointer as needed.
When an ot::Box goes out of scope, the underlying object is finalized
according to the OpenThread API for that type, via
ot::Boxable::finalize.
The underlying pointer may be taken from the box without finalization
by calling ot::Box::take_ot_ptr, which consumes the
ot::Box and returns the pointer.
§Safety
In general, the safety of this entire approach is dependent on the following assumptions on the language itself:
- Casting from pointers to references: Transmuting a 
*mut Self::OtTypeto a&Selfis not itself undefined behavior assuming the pointer pointed to a valid object. - Casting from references to pointers: Transmuting a 
&Selfthat was previously created by assumption 1 back into a*mut Self::OtTypewill always yield the original pointer value. - Behavior of Static Dispatch: Traits implemented on 
Selfand called via static dispatch will have&selfreferences that obey assumption #2. - No Spooky Stuff: No weird pointer/reference manipulation happens behind the scenes, like the spooky stuff C++ does.
 
Implementations§
Source§impl<T: Boxable> Box<T>
 
impl<T: Boxable> Box<T>
Sourcepub unsafe fn from_ot_ptr(ptr: *mut T::OtType) -> Option<Self>
 
pub unsafe fn from_ot_ptr(ptr: *mut T::OtType) -> Option<Self>
Takes ownership of an OpenThread object by wrapping it in an OtBox instance.
Unless subsequently removed by a call to [take_ot_ptr()], the pointed-to
object will be finalized when the box goes out of scope.
§Safety
This method is unsafe because it is effectively a deferred call
to Boxable::ref_from_ot_ptr, which is also unsafe. When calling,
care must be taken to ensure the following is true:
- The given pointer points to a valid instance of 
T::OtType. - The caller has logical ownership of the object being pointed to.
 
Sourcepub fn take_ot_ptr(self) -> *mut T::OtType
 
pub fn take_ot_ptr(self) -> *mut T::OtType
Releases ownership of the contained OpenThread object, returning it’s pointer.
Trait Implementations§
Source§impl<T: BackboneRouter + Boxable> BackboneRouter for Box<T>
 
impl<T: BackboneRouter + Boxable> BackboneRouter for Box<T>
Source§fn set_backbone_router_enabled(&self, enable: bool)
 
fn set_backbone_router_enabled(&self, enable: bool)
otsys::otBackboneRouterSetEnabled.Source§fn multicast_listener_get_next(
    &self,
    listener_iter: &mut otBackboneRouterMulticastListenerIterator,
) -> Option<BackboneRouterMulticastListenerInfo>
 
fn multicast_listener_get_next( &self, listener_iter: &mut otBackboneRouterMulticastListenerIterator, ) -> Option<BackboneRouterMulticastListenerInfo>
otsys::otBackboneRouterMulticastListenerGetNext.Source§fn set_multicast_listener_callback<'a, F>(&'a self, f: Option<F>)
 
fn set_multicast_listener_callback<'a, F>(&'a self, f: Option<F>)
otsys::otBackboneRouterSetMulticastListenerCallback.Source§fn iter_multicaster_listeners(&self) -> MulticastListenerIterator<'_, Self> ⓘ
 
fn iter_multicaster_listeners(&self) -> MulticastListenerIterator<'_, Self> ⓘ
Source§impl<T: BorderAgent + Boxable> BorderAgent for Box<T>
 
impl<T: BorderAgent + Boxable> BorderAgent for Box<T>
Source§fn border_agent_is_active(&self) -> bool
 
fn border_agent_is_active(&self) -> bool
otsys::otBorderAgentIsActive.Source§fn border_agent_get_udp_port(&self) -> u16
 
fn border_agent_get_udp_port(&self) -> u16
otsys::otBorderAgentUdpPort.Source§fn border_agent_get_meshcop_service_txt_data(&self) -> Result<Vec<u8>>
 
fn border_agent_get_meshcop_service_txt_data(&self) -> Result<Vec<u8>>
otsys::otBorderAgentGetMeshCoPServiceTxtData.Source§fn border_agent_ephemeral_key_get_state(&self) -> BorderAgentEphemeralKeyState
 
fn border_agent_ephemeral_key_get_state(&self) -> BorderAgentEphemeralKeyState
otsys::otBorderAgentEphemeralKeyGetState.Source§fn border_agent_ephemeral_key_set_enabled(&self, enabled: bool)
 
fn border_agent_ephemeral_key_set_enabled(&self, enabled: bool)
otsys::otBorderAgentEphemeralKeySetEnabled.Source§fn border_agent_ephemeral_key_start(
    &self,
    key: &CStr,
    timeout: u32,
    port: u16,
) -> Result
 
fn border_agent_ephemeral_key_start( &self, key: &CStr, timeout: u32, port: u16, ) -> Result
otsys::otBorderAgentEphemeralKeyStart.Source§fn border_agent_ephemeral_key_stop(&self)
 
fn border_agent_ephemeral_key_stop(&self)
otsys::otBorderAgentEphemeralKeyStop.Source§fn border_agent_ephemeral_key_get_udp_port(&self) -> u16
 
fn border_agent_ephemeral_key_get_udp_port(&self) -> u16
otsys::otBorderAgentEphemeralKeyGetUdpPort.Source§fn border_agent_set_ephemeral_key_callback<'a, F>(&'a self, f: Option<F>)where
    F: FnMut() + 'a,
 
fn border_agent_set_ephemeral_key_callback<'a, F>(&'a self, f: Option<F>)where
    F: FnMut() + 'a,
otsys::otBorderAgentEphemeralKeySetCallback.Source§fn border_agent_get_counters(&self) -> Option<BorderAgentCounters>
 
fn border_agent_get_counters(&self) -> Option<BorderAgentCounters>
otsys::otBorderAgentGetCounters.Source§fn border_agent_set_meshcop_service_changed_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut() + 'a,
 
fn border_agent_set_meshcop_service_changed_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut() + 'a,
Source§impl<T: BorderRouter + Boxable> BorderRouter for Box<T>
 
impl<T: BorderRouter + Boxable> BorderRouter for Box<T>
Source§fn add_external_route(&self, route: &ExternalRouteConfig) -> Result
 
fn add_external_route(&self, route: &ExternalRouteConfig) -> Result
otsys::otBorderRouterAddRoute.Source§fn add_on_mesh_prefix(&self, route: &BorderRouterConfig) -> Result
 
fn add_on_mesh_prefix(&self, route: &BorderRouterConfig) -> Result
otsys::otBorderRouterAddOnMeshPrefix.Source§fn remove_external_route(&self, prefix: &Ip6Prefix) -> Result
 
fn remove_external_route(&self, prefix: &Ip6Prefix) -> Result
otsys::otBorderRouterRemoveRoute.Source§fn remove_on_mesh_prefix(&self, prefix: &Ip6Prefix) -> Result
 
fn remove_on_mesh_prefix(&self, prefix: &Ip6Prefix) -> Result
otsys::otBorderRouterRemoveOnMeshPrefix.Source§fn border_router_register(&self) -> Result
 
fn border_router_register(&self) -> Result
otsys::otBorderRouterRegister.Source§fn border_routing_init(&self, infra_if: u32, infra_is_running: bool) -> Result
 
fn border_routing_init(&self, infra_if: u32, infra_is_running: bool) -> Result
otsys::otBorderRoutingInit.Source§fn border_routing_set_enabled(&self, enabled: bool) -> Result
 
fn border_routing_set_enabled(&self, enabled: bool) -> Result
otsys::otBorderRoutingSetEnabled.Source§fn border_routing_dhcp6_pd_set_enabled(&self, enabled: bool)
 
fn border_routing_dhcp6_pd_set_enabled(&self, enabled: bool)
otsys::otBorderRoutingDhcp6PdSetEnabled.Source§fn border_routing_dhcp6_pd_get_state(&self) -> BorderRoutingDhcp6PdState
 
fn border_routing_dhcp6_pd_get_state(&self) -> BorderRoutingDhcp6PdState
otsys::otBorderRoutingDhcp6PdGetState.Source§fn border_routing_dhcp6_pd_set_request_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(BorderRoutingDhcp6PdState) + 'a,
 
fn border_routing_dhcp6_pd_set_request_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(BorderRoutingDhcp6PdState) + 'a,
otsys::otBorderRoutingDhcp6PdSetRequestCallback.Source§fn border_routing_dhcp6_pd_state_change_stream(
    &self,
) -> BorderRoutingDhcp6PdStateChangedStream
 
fn border_routing_dhcp6_pd_state_change_stream( &self, ) -> BorderRoutingDhcp6PdStateChangedStream
Source§fn border_routing_get_pd_omr_prefix(
    &self,
) -> Result<BorderRoutingPrefixTableEntry>
 
fn border_routing_get_pd_omr_prefix( &self, ) -> Result<BorderRoutingPrefixTableEntry>
otsys::otBorderRoutingGetPdOmrPrefix.Source§fn border_routing_get_omr_prefix(&self) -> Result<Ip6Prefix>
 
fn border_routing_get_omr_prefix(&self) -> Result<Ip6Prefix>
otsys::otBorderRoutingGetOmrPrefix.Source§fn border_routing_get_on_link_prefix(&self) -> Result<Ip6Prefix>
 
fn border_routing_get_on_link_prefix(&self) -> Result<Ip6Prefix>
otsys::otBorderRoutingGetOnLinkPrefix.Source§fn border_routing_process_icmp6_ra(
    &self,
    message: &[u8],
) -> Result<(), WrongSize>
 
fn border_routing_process_icmp6_ra( &self, message: &[u8], ) -> Result<(), WrongSize>
otsys::otPlatBorderRoutingProcessIcmp6Ra.Source§fn border_routing_get_pd_processed_ra_info(&self) -> PdProcessedRaInfo
 
fn border_routing_get_pd_processed_ra_info(&self) -> PdProcessedRaInfo
otsys::otBorderRoutingGetPdProcessedRaInfo.Source§fn border_routing_is_multi_ail_detected(&self) -> bool
 
fn border_routing_is_multi_ail_detected(&self) -> bool
otsys::otBorderRoutingIsMultiAilDetected.Source§fn iter_next_local_external_route(
    &self,
    ot_iter: &mut otNetworkDataIterator,
) -> Option<ExternalRouteConfig>
 
fn iter_next_local_external_route( &self, ot_iter: &mut otNetworkDataIterator, ) -> Option<ExternalRouteConfig>
otsys::otBorderRouterGetNextRoute.Source§fn iter_next_local_on_mesh_prefix(
    &self,
    ot_iter: &mut otNetworkDataIterator,
) -> Option<BorderRouterConfig>
 
fn iter_next_local_on_mesh_prefix( &self, ot_iter: &mut otNetworkDataIterator, ) -> Option<BorderRouterConfig>
otsys::otBorderRouterGetNextOnMeshPrefix.Source§fn iter_local_external_routes(&self) -> LocalExternalRouteIterator<'_, Self> ⓘ
 
fn iter_local_external_routes(&self) -> LocalExternalRouteIterator<'_, Self> ⓘ
Source§fn iter_local_on_mesh_prefixes(&self) -> LocalOnMeshPrefixIterator<'_, Self> ⓘ
 
fn iter_local_on_mesh_prefixes(&self) -> LocalOnMeshPrefixIterator<'_, Self> ⓘ
Source§impl<T: Cli + Boxable> Cli for Box<T>
 
impl<T: Cli + Boxable> Cli for Box<T>
Source§fn cli_input_line(&self, line: &CStr)
 
fn cli_input_line(&self, line: &CStr)
otsys::otCliInputLine.Source§impl<T: Dataset + Boxable> Dataset for Box<T>
 
impl<T: Dataset + Boxable> Dataset for Box<T>
Source§fn is_commissioned(&self) -> bool
 
fn is_commissioned(&self) -> bool
otsys::otDatasetIsCommissioned.Source§fn dataset_create_new_network(&self, dataset: &mut OperationalDataset) -> Result
 
fn dataset_create_new_network(&self, dataset: &mut OperationalDataset) -> Result
otsys::otDatasetCreateNewNetwork.Source§fn dataset_get_active(&self, dataset: &mut OperationalDataset) -> Result
 
fn dataset_get_active(&self, dataset: &mut OperationalDataset) -> Result
otsys::otDatasetGetActive.Source§fn dataset_set_active(&self, dataset: &OperationalDataset) -> Result
 
fn dataset_set_active(&self, dataset: &OperationalDataset) -> Result
otsys::otDatasetSetActive.Source§fn dataset_set_pending(&self, dataset: &OperationalDataset) -> Result
 
fn dataset_set_pending(&self, dataset: &OperationalDataset) -> Result
otsys::otDatasetSetPending.Source§fn dataset_get_active_tlvs(&self) -> Result<OperationalDatasetTlvs>
 
fn dataset_get_active_tlvs(&self) -> Result<OperationalDatasetTlvs>
otsys::otDatasetGetActiveTlvs.Source§fn dataset_set_active_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result
 
fn dataset_set_active_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result
otsys::otDatasetSetActiveTlvs.Source§fn dataset_get_pending_tlvs(&self) -> Result<OperationalDatasetTlvs>
 
fn dataset_get_pending_tlvs(&self) -> Result<OperationalDatasetTlvs>
otsys::otDatasetGetPendingTlvs.Source§fn dataset_set_pending_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result
 
fn dataset_set_pending_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result
otsys::otDatasetSetPendingTlvs.Source§fn dataset_send_mgmt_pending_set<'a, F>(
    &self,
    dataset: OperationalDataset,
    dataset_tlvs: &[u8],
    f: F,
) -> Result
 
fn dataset_send_mgmt_pending_set<'a, F>( &self, dataset: OperationalDataset, dataset_tlvs: &[u8], f: F, ) -> Result
otsys::otDatasetSendMgmtPendingSet.Source§fn dataset_send_mgmt_pending_set_async(
    &self,
    dataset: OperationalDataset,
    dataset_tlvs: &[u8],
) -> Receiver<Result> ⓘ
 
fn dataset_send_mgmt_pending_set_async( &self, dataset: OperationalDataset, dataset_tlvs: &[u8], ) -> Receiver<Result> ⓘ
dataset_send_mgmt_pending_set].Source§impl<T: DnsUpstream + Boxable> DnsUpstream for Box<T>
 
impl<T: DnsUpstream + Boxable> DnsUpstream for Box<T>
Source§fn plat_dns_upstream_query_done(
    &self,
    query_context: &PlatDnsUpstreamQuery,
    response: Box<Message<'_>>,
)
 
fn plat_dns_upstream_query_done( &self, query_context: &PlatDnsUpstreamQuery, response: Box<Message<'_>>, )
Source§impl<T: Dnssd + Boxable> Dnssd for Box<T>
 
impl<T: Dnssd + Boxable> Dnssd for Box<T>
Source§fn dnssd_get_next_query(&self, prev: Option<&DnssdQuery>) -> Option<&DnssdQuery>
 
fn dnssd_get_next_query(&self, prev: Option<&DnssdQuery>) -> Option<&DnssdQuery>
otDnssdGetNextQuery. Read moreSource§fn dnssd_query_handle_discovered_host(
    &self,
    hostname: &CStr,
    addresses: &[Ip6Address],
    ttl: u32,
)
 
fn dnssd_query_handle_discovered_host( &self, hostname: &CStr, addresses: &[Ip6Address], ttl: u32, )
otDnssdQueryHandleDiscoveredHost.Source§fn dnssd_query_handle_discovered_service_instance(
    &self,
    service_full_name: &CStr,
    addresses: &[Ip6Address],
    full_name: &CStr,
    host_name: &CStr,
    port: u16,
    priority: u16,
    ttl: u32,
    txt_data: &[u8],
    weight: u16,
)
 
fn dnssd_query_handle_discovered_service_instance( &self, service_full_name: &CStr, addresses: &[Ip6Address], full_name: &CStr, host_name: &CStr, port: u16, priority: u16, ttl: u32, txt_data: &[u8], weight: u16, )
otDnssdQueryHandleDiscoveredServiceInstance. Read moreSource§fn dnssd_query_set_callbacks<'a, F>(&'a self, f: Option<F>)
 
fn dnssd_query_set_callbacks<'a, F>(&'a self, f: Option<F>)
otsys::otDnssdQuerySetCallbacks. Read moreSource§fn dnssd_get_counters(&self) -> &DnssdCounters
 
fn dnssd_get_counters(&self) -> &DnssdCounters
otsys::otDnssdGetCounters.Source§fn dnssd_upstream_query_is_enabled(&self) -> bool
 
fn dnssd_upstream_query_is_enabled(&self) -> bool
otsys::otDnssdUpstreamQueryIsEnabledSource§fn dnssd_upstream_query_set_enabled(&self, enabled: bool)
 
fn dnssd_upstream_query_set_enabled(&self, enabled: bool)
otsys::otDnssdUpstreamQuerySetEnabledSource§impl<T: InfraInterface + Boxable> InfraInterface for Box<T>
 
impl<T: InfraInterface + Boxable> InfraInterface for Box<T>
Source§fn plat_infra_if_on_state_changed(&self, id: u32, is_running: bool)
 
fn plat_infra_if_on_state_changed(&self, id: u32, is_running: bool)
Source§fn plat_infra_if_discover_nat64_prefix_done(
    &self,
    infra_if_idx: u32,
    ip6_prefix: Ip6Prefix,
)
 
fn plat_infra_if_discover_nat64_prefix_done( &self, infra_if_idx: u32, ip6_prefix: Ip6Prefix, )
Source§impl<T: Ip6 + Boxable> Ip6 for Box<T>
 
impl<T: Ip6 + Boxable> Ip6 for Box<T>
Source§fn ip6_send(&self, message: OtMessageBox<'_>) -> Result<()>
 
fn ip6_send(&self, message: OtMessageBox<'_>) -> Result<()>
otsys::otIp6Send.Source§fn ip6_send_data(&self, data: &[u8]) -> Result
 
fn ip6_send_data(&self, data: &[u8]) -> Result
ip6_send()], but takes a byte slice instead
of an OtMessageBox.Source§fn ip6_send_data_direct(&self, data: &[u8]) -> Result
 
fn ip6_send_data_direct(&self, data: &[u8]) -> Result
ip6_send_data()], but sends the packet without layer-2 security.Source§fn ip6_is_enabled(&self) -> bool
 
fn ip6_is_enabled(&self) -> bool
otsys::otIp6IsEnabled.Source§fn ip6_set_enabled(&self, enabled: bool) -> Result
 
fn ip6_set_enabled(&self, enabled: bool) -> Result
otsys::otIp6SetEnabled.Source§fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result
 
fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result
otsys::otIp6AddUnicastAddress.Source§fn ip6_remove_unicast_address(&self, addr: &Ipv6Addr) -> Result
 
fn ip6_remove_unicast_address(&self, addr: &Ipv6Addr) -> Result
otsys::otIp6RemoveUnicastAddress.Source§fn ip6_join_multicast_group(&self, addr: &Ipv6Addr) -> Result
 
fn ip6_join_multicast_group(&self, addr: &Ipv6Addr) -> Result
otsys::otIp6SubscribeMulticastAddress.Source§fn ip6_leave_multicast_group(&self, addr: &Ipv6Addr) -> Result
 
fn ip6_leave_multicast_group(&self, addr: &Ipv6Addr) -> Result
otsys::otIp6UnsubscribeMulticastAddress.Source§fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(OtMessageBox<'_>) + 'a,
 
fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(OtMessageBox<'_>) + 'a,
otsys::otIp6SetReceiveCallback. Read moreSource§fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
 
fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
otsys::otIp6SetAddressCallback. Read moreSource§fn ip6_is_slaac_enabled(&self) -> bool
 
fn ip6_is_slaac_enabled(&self) -> bool
otsys::otIp6IsSlaacEnabled.Source§fn ip6_set_slaac_enabled(&self, enabled: bool)
 
fn ip6_set_slaac_enabled(&self, enabled: bool)
otsys::otIp6SetSlaacEnabled.Source§fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode
 
fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode
otsys::otIcmp6GetEchoMode.Source§fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)
 
fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)
otsys::otIcmp6SetEchoMode.Source§fn ip6_set_receive_filter_enabled(&self, enabled: bool)
 
fn ip6_set_receive_filter_enabled(&self, enabled: bool)
otsys::otIp6SetReceiveFilterEnabled.Source§fn ip6_is_receive_filter_enabled(&self) -> bool
 
fn ip6_is_receive_filter_enabled(&self) -> bool
otsys::otIp6IsReceiveFilterEnabled.Source§fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters
 
fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters
otsys::otIp6GetBorderRoutingCounters.Source§fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ⓘ
 
fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ⓘ
otsys::otIp6GetUnicastAddresses.Source§impl<T: Joiner + Boxable> Joiner for Box<T>
 
impl<T: Joiner + Boxable> Joiner for Box<T>
Source§fn joiner_start<'a, F: FnOnce(Result) + 'a>(
    &self,
    pskd: &str,
    provisioning_url: Option<&str>,
    vendor_name: Option<&str>,
    vendor_model: Option<&str>,
    vendor_sw_version: Option<&str>,
    vendor_data: Option<&str>,
    callback: F,
) -> Result
 
fn joiner_start<'a, F: FnOnce(Result) + 'a>( &self, pskd: &str, provisioning_url: Option<&str>, vendor_name: Option<&str>, vendor_model: Option<&str>, vendor_sw_version: Option<&str>, vendor_data: Option<&str>, callback: F, ) -> Result
otsys::otJoinerStart.Source§fn joiner_stop(&self)
 
fn joiner_stop(&self)
otsys::otJoinerStop.Source§fn joiner_get_state(&self) -> JoinerState
 
fn joiner_get_state(&self) -> JoinerState
otsys::otJoinerGetState.Source§impl<T: Link + Boxable> Link for Box<T>
 
impl<T: Link + Boxable> Link for Box<T>
Source§fn get_channel(&self) -> ChannelIndex
 
fn get_channel(&self) -> ChannelIndex
otsys::otLinkGetChannel.Source§fn set_channel(&self, index: ChannelIndex) -> Result
 
fn set_channel(&self, index: ChannelIndex) -> Result
otsys::otLinkSetChannel.Source§fn link_get_counters(&self) -> &MacCounters
 
fn link_get_counters(&self) -> &MacCounters
otsys::otLinkGetCounters.Source§fn get_extended_address(&self) -> &ExtAddress
 
fn get_extended_address(&self) -> &ExtAddress
otsys::otLinkGetExtendedAddress.Source§fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress
 
fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress
otsys::otLinkGetFactoryAssignedIeeeEui64.Source§fn get_pan_id(&self) -> PanId
 
fn get_pan_id(&self) -> PanId
otsys::otLinkGetPanId.Source§fn set_pan_id(&self, pan_id: PanId) -> Result<()>
 
fn set_pan_id(&self, pan_id: PanId) -> Result<()>
otsys::otLinkSetPanId.Source§fn get_short_address(&self) -> ShortAddress
 
fn get_short_address(&self) -> ShortAddress
otsys::otLinkGetShortAddress.Source§fn link_is_enabled(&self) -> bool
 
fn link_is_enabled(&self) -> bool
otsys::otLinkIsEnabled.Source§fn link_set_enabled(&self, enabled: bool) -> Result
 
fn link_set_enabled(&self, enabled: bool) -> Result
otsys::otLinkSetEnabled.Source§fn link_is_promiscuous(&self) -> bool
 
fn link_is_promiscuous(&self) -> bool
otsys::otLinkIsPromiscuous.Source§fn link_set_promiscuous(&self, promiscuous: bool) -> Result
 
fn link_set_promiscuous(&self, promiscuous: bool) -> Result
otsys::otLinkSetPromiscuous.Source§fn is_energy_scan_in_progress(&self) -> bool
 
fn is_energy_scan_in_progress(&self) -> bool
otsys::otLinkIsEnergyScanInProgress.Source§fn is_active_scan_in_progress(&self) -> bool
 
fn is_active_scan_in_progress(&self) -> bool
otsys::otLinkIsActiveScanInProgress.Source§fn get_supported_channel_mask(&self) -> ChannelMask ⓘ
 
fn get_supported_channel_mask(&self) -> ChannelMask ⓘ
otsys::otLinkGetSupportedChannelMask.Source§fn start_active_scan<'a, F>(
    &self,
    channels: ChannelMask,
    dwell: Duration,
    f: F,
) -> Result
 
fn start_active_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
otsys::otLinkActiveScan. Read moreSource§fn start_energy_scan<'a, F>(
    &self,
    channels: ChannelMask,
    dwell: Duration,
    f: F,
) -> Result
 
fn start_energy_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
otsys::otLinkEnergyScan. Read moreSource§impl<T: LinkMetrics + Boxable> LinkMetrics for Box<T>
 
impl<T: LinkMetrics + Boxable> LinkMetrics for Box<T>
Source§fn link_metrics_manager_is_enabled(&self) -> bool
 
fn link_metrics_manager_is_enabled(&self) -> bool
Source§fn link_metrics_manager_set_enabled(&self, enabled: bool)
 
fn link_metrics_manager_set_enabled(&self, enabled: bool)
Source§fn link_metrics_manager_get_metrics_value_by_ext_addr(
    &self,
    ext_addr: &ExtAddress,
) -> Result<LinkMetricsValues>
 
fn link_metrics_manager_get_metrics_value_by_ext_addr( &self, ext_addr: &ExtAddress, ) -> Result<LinkMetricsValues>
Source§impl<T: MessageBuffer + Boxable> MessageBuffer for Box<T>
 
impl<T: MessageBuffer + Boxable> MessageBuffer for Box<T>
Source§fn get_buffer_info(&self) -> BufferInfo
 
fn get_buffer_info(&self) -> BufferInfo
otsys::otMessageGetBufferInfo.Source§impl<T: Nat64 + Boxable> Nat64 for Box<T>
 
impl<T: Nat64 + Boxable> Nat64 for Box<T>
Source§fn nat64_set_enabled(&self, enabled: bool)
 
fn nat64_set_enabled(&self, enabled: bool)
Source§fn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result
 
fn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result
Source§fn nat64_get_cidr(&self) -> Result<Ip4Cidr>
 
fn nat64_get_cidr(&self) -> Result<Ip4Cidr>
Source§fn nat64_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(OtMessageBox<'_>) + 'a,
 
fn nat64_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
    F: FnMut(OtMessageBox<'_>) + 'a,
Source§fn nat64_send(&self, message: OtMessageBox<'_>) -> Result
 
fn nat64_send(&self, message: OtMessageBox<'_>) -> Result
Source§fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result
 
fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result
Source§fn nat64_infra_if_prefix_discover_done(
    &self,
    infra_if_idx: NetifIndex,
    ip6_prefix: otIp6Prefix,
)
 
fn nat64_infra_if_prefix_discover_done( &self, infra_if_idx: NetifIndex, ip6_prefix: otIp6Prefix, )
Source§fn nat64_init_address_mapping_iterator(
    &self,
    iter: &mut otNat64AddressMappingIterator,
)
 
fn nat64_init_address_mapping_iterator( &self, iter: &mut otNat64AddressMappingIterator, )
Source§fn nat64_get_next_address_mapping(
    &self,
    iter: &mut otNat64AddressMappingIterator,
    mapping: &mut Nat64AddressMapping,
) -> Result
 
fn nat64_get_next_address_mapping( &self, iter: &mut otNat64AddressMappingIterator, mapping: &mut Nat64AddressMapping, ) -> Result
Source§fn nat64_get_translator_state(&self) -> Nat64State
 
fn nat64_get_translator_state(&self) -> Nat64State
Source§fn nat64_get_prefix_manager_state(&self) -> Nat64State
 
fn nat64_get_prefix_manager_state(&self) -> Nat64State
Source§fn nat64_get_error_counters(&self) -> Nat64ErrorCounters
 
fn nat64_get_error_counters(&self) -> Nat64ErrorCounters
Source§fn nat64_get_counters(&self) -> Nat64ProtocolCounters
 
fn nat64_get_counters(&self) -> Nat64ProtocolCounters
Source§fn nat64_get_address_mapping_iterator(
    &self,
) -> Nat64AddressMappingIterator<'_, Self> ⓘ
 
fn nat64_get_address_mapping_iterator( &self, ) -> Nat64AddressMappingIterator<'_, Self> ⓘ
Source§impl<T: NetData + Boxable> NetData for Box<T>
 
impl<T: NetData + Boxable> NetData for Box<T>
Source§fn net_data_get<'a>(&self, stable: bool, data: &'a mut [u8]) -> Result<&'a [u8]>
 
fn net_data_get<'a>(&self, stable: bool, data: &'a mut [u8]) -> Result<&'a [u8]>
otsys::otNetDataGet.Source§fn net_data_get_version(&self) -> u8
 
fn net_data_get_version(&self) -> u8
otsys::otNetDataGetVersion.Source§fn net_data_get_stable_version(&self) -> u8
 
fn net_data_get_stable_version(&self) -> u8
otsys::otNetDataGetStableVersion.Source§impl<T: PlatTrel + Boxable> PlatTrel for Box<T>
 
impl<T: PlatTrel + Boxable> PlatTrel for Box<T>
Source§fn plat_trel_handle_received(&self, packet: &[u8], sock_addr: &SockAddr)
 
fn plat_trel_handle_received(&self, packet: &[u8], sock_addr: &SockAddr)
Source§fn plat_trel_handle_discovered_peer_info(
    &self,
    peer_info: &PlatTrelPeerInfo<'_>,
)
 
fn plat_trel_handle_discovered_peer_info( &self, peer_info: &PlatTrelPeerInfo<'_>, )
Source§impl<T: Radio + Boxable> Radio for Box<T>
 
impl<T: Radio + Boxable> Radio for Box<T>
Source§fn get_coex_metrics(&self) -> Result<RadioCoexMetrics>
 
fn get_coex_metrics(&self) -> Result<RadioCoexMetrics>
otsys::otPlatRadioGetCoexMetrics.Source§fn get_rssi(&self) -> Decibels
 
fn get_rssi(&self) -> Decibels
otsys::otPlatRadioGetRssi.Source§fn get_region(&self) -> Result<RadioRegion>
 
fn get_region(&self) -> Result<RadioRegion>
otsys::otPlatRadioGetRegion.Source§fn set_region(&self, region: RadioRegion) -> Result
 
fn set_region(&self, region: RadioRegion) -> Result
otsys::otPlatRadioSetRegion.Source§fn get_transmit_power(&self) -> Result<Decibels>
 
fn get_transmit_power(&self) -> Result<Decibels>
otsys::otPlatRadioGetTransmitPower.Source§fn radio_get_version_string(&self) -> &str
 
fn radio_get_version_string(&self) -> &str
otsys::otPlatRadioGetVersionString.Source§fn on_radio_handle_state_change(&self, flags: ChangedFlags)
 
fn on_radio_handle_state_change(&self, flags: ChangedFlags)
Source§impl<T: Reset + Boxable> Reset for Box<T>
 
impl<T: Reset + Boxable> Reset for Box<T>
Source§fn reset(&self)
 
fn reset(&self)
otsys::otInstanceReset.Source§fn factory_reset(&self)
 
fn factory_reset(&self)
otsys::otInstanceFactoryReset.Source§fn erase_persistent_info(&self) -> Result
 
fn erase_persistent_info(&self) -> Result
otsys::otInstanceErasePersistentInfo.Source§impl<T: SrpServer + Boxable> SrpServer for Box<T>
 
impl<T: SrpServer + Boxable> SrpServer for Box<T>
Source§fn srp_server_get_address_mode(&self) -> SrpServerAddressMode
 
fn srp_server_get_address_mode(&self) -> SrpServerAddressMode
otsys::otSrpServerGetAddressMode.Source§fn srp_server_get_state(&self) -> SrpServerState
 
fn srp_server_get_state(&self) -> SrpServerState
otsys::otSrpServerGetState.Source§fn srp_server_get_port(&self) -> u16
 
fn srp_server_get_port(&self) -> u16
otsys::otSrpServerGetPort.Source§fn srp_server_set_auto_enable_mode(&self, enabled: bool)
 
fn srp_server_set_auto_enable_mode(&self, enabled: bool)
otsys::otSrpServerSetEnabled.Source§fn srp_server_set_enabled(&self, enabled: bool)
 
fn srp_server_set_enabled(&self, enabled: bool)
otsys::otSrpServerSetEnabled.Source§fn srp_server_is_enabled(&self) -> bool
 
fn srp_server_is_enabled(&self) -> bool
Source§fn srp_server_is_auto_enable_mode(&self) -> bool
 
fn srp_server_is_auto_enable_mode(&self) -> bool
Source§fn srp_server_is_running(&self) -> bool
 
fn srp_server_is_running(&self) -> bool
Source§fn srp_server_set_domain(&self, domain: &CStr) -> Result
 
fn srp_server_set_domain(&self, domain: &CStr) -> Result
otsys::otSrpServerSetDomain.Source§fn srp_server_get_domain(&self) -> &CStr
 
fn srp_server_get_domain(&self) -> &CStr
otsys::otSrpServerGetDomain.Source§fn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters
 
fn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters
otsys::otSrpServerGetResponseCounters.Source§fn srp_server_next_host<'a>(
    &'a self,
    prev: Option<&'a SrpServerHost>,
) -> Option<&'a SrpServerHost>
 
fn srp_server_next_host<'a>( &'a self, prev: Option<&'a SrpServerHost>, ) -> Option<&'a SrpServerHost>
otsys::otSrpServerGetNextHost.Source§fn srp_server_handle_service_update_result(
    &self,
    id: SrpServerServiceUpdateId,
    result: Result,
)
 
fn srp_server_handle_service_update_result( &self, id: SrpServerServiceUpdateId, result: Result, )
otsys::otSrpServerHandleServiceUpdateResult.Source§fn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)
 
fn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)
otsys::otSrpServerSetServiceUpdateHandler.Source§fn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self> ⓘwhere
    Self: Sized,
 
fn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self> ⓘwhere
    Self: Sized,
Source§impl<T: State + Boxable> State for Box<T>
 
impl<T: State + Boxable> State for Box<T>
Source§fn set_state_changed_fn<F>(&self, f: Option<F>)where
    F: FnMut(ChangedFlags) + 'static,
 
fn set_state_changed_fn<F>(&self, f: Option<F>)where
    F: FnMut(ChangedFlags) + 'static,
otsys::otSetStateChangedCallback.Source§fn state_changed_stream(&self) -> StateChangedStream
 
fn state_changed_stream(&self) -> StateChangedStream
Source§impl<T: Tasklets + Boxable> Tasklets for Box<T>
 
impl<T: Tasklets + Boxable> Tasklets for Box<T>
Source§fn wake_waker(&self)
 
fn wake_waker(&self)
set_waker].Source§fn process(&self)
 
fn process(&self)
otsys::otTaskletsProcess.Source§fn has_pending(&self) -> bool
 
fn has_pending(&self) -> bool
otsys::otTaskletsHasPending.Source§impl<T: Thread + Boxable> Thread for Box<T>
 
impl<T: Thread + Boxable> Thread for Box<T>
Source§fn become_leader(&self) -> Result<()>
 
fn become_leader(&self) -> Result<()>
otsys::otThreadBecomeLeader.Source§fn become_router(&self) -> Result<()>
 
fn become_router(&self) -> Result<()>
otsys::otThreadBecomeRouter.Source§fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
 
fn get_child_info_by_id(&self, child_id: u16) -> Result<otChildInfo>
otsys::otThreadGetChildInfoById.Source§fn get_leader_data(&self) -> Result<LeaderData>
 
fn get_leader_data(&self) -> Result<LeaderData>
otsys::otThreadGetLeaderData.Source§fn get_leader_weight(&self) -> u8
 
fn get_leader_weight(&self) -> u8
otsys::otThreadGetLeaderWeight.Source§fn get_network_key(&self) -> NetworkKey
 
fn get_network_key(&self) -> NetworkKey
otsys::otThreadGetNetworkKey.Source§fn set_network_key(&self, key: &NetworkKey) -> Result
 
fn set_network_key(&self, key: &NetworkKey) -> Result
otsys::otThreadSetNetworkKey.Source§fn get_network_name_as_slice(&self) -> &[u8] ⓘ
 
fn get_network_name_as_slice(&self) -> &[u8] ⓘ
otsys::otThreadGetNetworkName.Source§fn set_network_name(&self, name: &NetworkName) -> Result
 
fn set_network_name(&self, name: &NetworkName) -> Result
otsys::otThreadSetNetworkName.Source§fn is_singleton(&self) -> bool
 
fn is_singleton(&self) -> bool
otsys::otThreadIsSingleton.Source§fn get_extended_pan_id(&self) -> &ExtendedPanId
 
fn get_extended_pan_id(&self) -> &ExtendedPanId
otsys::otThreadGetExtendedPanId.Source§fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
 
fn set_extended_pan_id(&self, xpanid: &ExtendedPanId) -> Result
otsys::otThreadSetExtendedPanId.Source§fn thread_set_enabled(&self, enabled: bool) -> Result
 
fn thread_set_enabled(&self, enabled: bool) -> Result
otsys::otThreadSetEnabled.Source§fn get_device_role(&self) -> DeviceRole
 
fn get_device_role(&self) -> DeviceRole
otsys::otThreadGetDeviceRole.Source§fn get_partition_id(&self) -> u32
 
fn get_partition_id(&self) -> u32
otsys::otThreadGetPartitionId.Source§fn get_rloc16(&self) -> u16
 
fn get_rloc16(&self) -> u16
otsys::otThreadGetRloc16.Source§fn get_link_mode(&self) -> LinkModeConfig
 
fn get_link_mode(&self) -> LinkModeConfig
otsys::otThreadGetLinkMode.Source§fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
 
fn set_link_mode(&self, link_mode_config: LinkModeConfig) -> Result
otsys::otThreadSetLinkMode.Source§fn get_mesh_local_eid(&self) -> Ipv6Addr
 
fn get_mesh_local_eid(&self) -> Ipv6Addr
otsys::otThreadGetMeshLocalEid.Source§fn get_link_local_addr(&self) -> Ipv6Addr
 
fn get_link_local_addr(&self) -> Ipv6Addr
otsys::otThreadGetLinkLocalIp6Address.Source§fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
 
fn get_link_local_all_nodes_multicast_addr(&self) -> Ipv6Addr
otsys::otThreadGetLinkLocalAllThreadNodesMulticastAddress.Source§fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
 
fn get_mesh_local_prefix(&self) -> &MeshLocalPrefix
otsys::otThreadGetMeshLocalPrefix.Source§fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
 
fn get_router_info(&self, router_id: u16) -> Result<RouterInfo>
otsys::otThreadGetRouterInfo.Source§fn get_ip6_counters(&self) -> &IpCounters
 
fn get_ip6_counters(&self) -> &IpCounters
otsys::otThreadGetIp6Counters.Source§fn iter_next_neighbor_info(
    &self,
    ot_iter: &mut otNeighborInfoIterator,
) -> Option<NeighborInfo>
 
fn iter_next_neighbor_info( &self, ot_iter: &mut otNeighborInfoIterator, ) -> Option<NeighborInfo>
otsys::otThreadGetNextNeighborInfo.Source§fn get_network_name(&self) -> NetworkName
 
fn get_network_name(&self) -> NetworkName
get_network_name_as_slice], but returns
an ot::NetworkName.Source§fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
 
fn iter_neighbor_info(&self) -> NeighborInfoIterator<'_, Self> ⓘ
Source§impl<T: Trel + Boxable> Trel for Box<T>
 
impl<T: Trel + Boxable> Trel for Box<T>
Source§fn trel_set_enabled(&self, enabled: bool)
 
fn trel_set_enabled(&self, enabled: bool)
Source§fn trel_is_enabled(&self) -> bool
 
fn trel_is_enabled(&self) -> bool
Source§fn trel_get_counters(&self) -> Option<&TrelCounters>
 
fn trel_get_counters(&self) -> Option<&TrelCounters>
Source§fn trel_reset_counters(&self)
 
fn trel_reset_counters(&self)
Source§fn trel_get_number_of_peers(&self) -> u16
 
fn trel_get_number_of_peers(&self) -> u16
Source§impl<T: Udp + Boxable> Udp for Box<T>
 
impl<T: Udp + Boxable> Udp for Box<T>
Source§fn udp_get_sockets(&self) -> UdpSocketIterator<'_> ⓘ
 
fn udp_get_sockets(&self) -> UdpSocketIterator<'_> ⓘ
otsys::otUdpGetSockets.Source§impl<T: Uptime + Boxable> Uptime for Box<T>
 
impl<T: Uptime + Boxable> Uptime for Box<T>
Source§fn get_uptime(&self) -> MonotonicDuration
 
fn get_uptime(&self) -> MonotonicDuration
otsys::otInstanceGetUptime.impl<T: Boxable + InstanceInterface> InstanceInterface for Box<T>
impl<T: Boxable + Send> Send for Box<T>
impl<T: Boxable + Sync> Sync for Box<T>
Auto Trait Implementations§
impl<T> Freeze for Box<T>
impl<T> RefUnwindSafe for Box<T>
impl<T> Unpin for Box<T>where
    T: Unpin,
impl<T> UnwindSafe for Box<T>
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
Source§impl<T> DnssdExt for Twhere
    T: Dnssd,
 
impl<T> DnssdExt for Twhere
    T: Dnssd,
Source§fn dnssd_queries(&self) -> DnssdQueryIterator<'_, Self> ⓘwhere
    Self: Sized,
 
fn dnssd_queries(&self) -> DnssdQueryIterator<'_, Self> ⓘwhere
    Self: Sized,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous1, D> for Twhere
    D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
 
impl<T, D> Encode<Ambiguous2, D> for Twhere
    D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
 
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
 
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> Pointable for T
 
impl<T> Pointable for T
Source§impl<R> Rng for R
 
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
    StandardUniform: Distribution<T>,
 
fn random<T>(&mut self) -> Twhere
    StandardUniform: Distribution<T>,
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
 
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T>
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
    T: SampleUniform,
    R: SampleRange<T>,
 
fn random_range<T, R>(&mut self, range: R) -> Twhere
    T: SampleUniform,
    R: SampleRange<T>,
Source§fn random_bool(&mut self, p: f64) -> bool
 
fn random_bool(&mut self, p: f64) -> bool
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
 
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
    D: Distribution<T>,
 
fn sample<T, D>(&mut self, distr: D) -> Twhere
    D: Distribution<T>,
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
    D: Distribution<T>,
    Self: Sized,
 
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T>where
    D: Distribution<T>,
    Self: Sized,
Source§fn gen<T>(&mut self) -> Twhere
    StandardUniform: Distribution<T>,
 
fn gen<T>(&mut self) -> Twhere
    StandardUniform: Distribution<T>,
random to avoid conflict with the new gen keyword in Rust 2024.Rng::random.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
    T: SampleUniform,
    R: SampleRange<T>,
 
fn gen_range<T, R>(&mut self, range: R) -> Twhere
    T: SampleUniform,
    R: SampleRange<T>,
random_rangeRng::random_range.Source§impl<R> TryRngCore for R
 
impl<R> TryRngCore for R
Source§type Error = Infallible
 
type Error = Infallible
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
 
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
 
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
u64.Source§fn try_fill_bytes(
    &mut self,
    dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
 
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
 
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
UnwrapMut wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
    Self: Sized,
 
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
    Self: Sized,
RngCore to a RngReadAdapter.