Struct openthread::ot::Box
source · 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::OtType
to a&Self
is not itself undefined behavior assuming the pointer pointed to a valid object. - Casting from references to pointers: Transmuting a
&Self
that was previously created by assumption 1 back into a*mut Self::OtType
will always yield the original pointer value. - Behavior of Static Dispatch: Traits implemented on
Self
and called via static dispatch will have&self
references 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_add(&self, addr: &Ip6Address, timeout: u32) -> Result
fn multicast_listener_add(&self, addr: &Ip6Address, timeout: u32) -> Result
otsys::otBackboneRouterMulticastListenerAdd
.source§fn multicast_listener_clear(&self)
fn multicast_listener_clear(&self)
otsys::otBackboneRouterMulticastListenerClear
.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 config_next_multicast_listener_registration_response(&self, status: u8)
fn config_next_multicast_listener_registration_response(&self, status: u8)
otsys::otBackboneRouterConfigNextMulticastListenerRegistrationResponse
.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_get_state(&self) -> BorderAgentState
fn border_agent_get_state(&self) -> BorderAgentState
otsys::otBorderAgentGetState
.source§fn border_agent_get_udp_port(&self) -> u16
fn border_agent_get_udp_port(&self) -> u16
otsys::otBorderAgentUdpPort
.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_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 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::otDnssdUpstreamQueryIsEnabled
source§fn dnssd_upstream_query_set_enabled(&self, enabled: bool)
fn dnssd_upstream_query_set_enabled(&self, enabled: bool)
otsys::otDnssdUpstreamQuerySetEnabled
source§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: 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])
fn plat_trel_handle_received(&self, packet: &[u8])
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§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) -> Duration
fn get_uptime(&self) -> Duration
otsys::otInstanceGetUptime
.