openthread::ot

Struct Instance

Source
pub struct Instance(/* private fields */);
Expand description

OpenThread instance.

This type cannot be instantiated directly: owned instances are passed around in an ot::Box<ot::Instance>, or OtInstanceBox for short.

Implementations§

Source§

impl Instance

Source

pub fn new<T: Platform + 'static>(platform: T) -> Box<Instance>

Initializes and returns a new boxed singleton OpenThread instance.

If called twice without dropping the first instance, this method will panic.

Trait Implementations§

Source§

impl BackboneRouter for Instance

Source§

impl BorderAgent for Instance

Source§

impl BorderRouter for Instance

Source§

fn add_external_route(&self, route: &ExternalRouteConfig) -> Result

Functional equivalent of otsys::otBorderRouterAddRoute.
Source§

fn add_on_mesh_prefix(&self, route: &BorderRouterConfig) -> Result

Functional equivalent of otsys::otBorderRouterAddOnMeshPrefix.
Source§

fn remove_external_route(&self, prefix: &Ip6Prefix) -> Result

Functional equivalent of otsys::otBorderRouterRemoveRoute.
Source§

fn remove_on_mesh_prefix(&self, prefix: &Ip6Prefix) -> Result

Functional equivalent of otsys::otBorderRouterRemoveOnMeshPrefix.
Source§

fn border_router_register(&self) -> Result

Functional equivalent of otsys::otBorderRouterRegister.
Source§

fn border_routing_init(&self, infra_if: u32, infra_is_running: bool) -> Result

Functional equivalent of otsys::otBorderRoutingInit.
Source§

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

Functional equivalent of otsys::otBorderRoutingSetEnabled.
Source§

fn border_routing_dhcp6_pd_set_enabled(&self, enabled: bool)

Functional equivalent of otsys::otBorderRoutingDhcp6PdSetEnabled.
Source§

fn border_routing_dhcp6_pd_get_state(&self) -> BorderRoutingDhcp6PdState

Functional equivalent of otsys::otBorderRoutingDhcp6PdGetState.
Source§

fn border_routing_dhcp6_pd_set_request_fn<'a, F>(&'a self, f: Option<F>)

Source§

fn border_routing_dhcp6_pd_state_change_stream( &self, ) -> BorderRoutingDhcp6PdStateChangedStream

Get the DHCPv6 PD state change stream
Source§

fn border_routing_get_pd_omr_prefix( &self, ) -> Result<BorderRoutingPrefixTableEntry>

Functional equivalent of otsys::otBorderRoutingGetPdOmrPrefix.
Source§

fn border_routing_get_omr_prefix(&self) -> Result<Ip6Prefix>

Functional equivalent of otsys::otBorderRoutingGetOmrPrefix.
Functional equivalent of otsys::otBorderRoutingGetOnLinkPrefix.
Source§

fn border_routing_process_icmp6_ra( &self, message: &[u8], ) -> Result<(), WrongSize>

Source§

fn border_routing_get_pd_processed_ra_info(&self) -> PdProcessedRaInfo

Source§

fn iter_next_local_external_route( &self, ot_iter: &mut otNetworkDataIterator, ) -> Option<ExternalRouteConfig>

Functional equivalent of otsys::otBorderRouterGetNextRoute.
Source§

fn iter_next_local_on_mesh_prefix( &self, ot_iter: &mut otNetworkDataIterator, ) -> Option<BorderRouterConfig>

Source§

fn iter_local_external_routes(&self) -> LocalExternalRouteIterator<'_, Self>

Returns an iterator for iterating over external routes.
Source§

fn iter_local_on_mesh_prefixes(&self) -> LocalOnMeshPrefixIterator<'_, Self>

Returns an iterator for iterating over on-mesh prefixes
Source§

impl Boxable for Instance

Source§

type OtType = otInstance

The underlying implementation-opaque OpenThread type used by the standard C-API.
Source§

unsafe fn finalize(&mut self)

Finalizes or frees the underlying OpenThread object. Read more
Source§

unsafe fn ref_from_ot_ptr<'a>(ptr: *mut Self::OtType) -> Option<&'a Self>

Creates a reference to a safe wrapper object from an OpenThread pointer. Read more
Source§

unsafe fn ref_from_ot_const_ptr<'a>( ptr: *const Self::OtType, ) -> Option<&'a Self>

Creates a reference to a safe wrapper object from an OpenThread const pointer. Read more
Source§

unsafe fn mut_from_ot_ptr<'a>(ptr: *mut Self::OtType) -> Option<&'a mut Self>

Creates a mutable reference to a safe wrapper object from an OpenThread pointer. Read more
Source§

fn as_ot_ptr(&self) -> *mut Self::OtType

Returns the underlying OpenThread pointer for this object. The default implementation simply casts the reference to a pointer.
Source§

impl Cli for Instance

Source§

fn cli_input_line(&self, line: &CStr)

Functional equivalent of otsys::otCliInputLine.
Source§

fn cli_init<'a, F>(&self, f: F)
where F: FnMut(&CStr) + 'a,

Functional equivalent of otsys::otCliInit.
Source§

impl Dataset for Instance

Source§

fn is_commissioned(&self) -> bool

Functional equivalent of otsys::otDatasetIsCommissioned.
Source§

fn dataset_create_new_network(&self, dataset: &mut OperationalDataset) -> Result

Functional equivalent of otsys::otDatasetCreateNewNetwork.
Source§

fn dataset_get_active(&self, dataset: &mut OperationalDataset) -> Result

Functional equivalent of otsys::otDatasetGetActive.
Source§

fn dataset_set_active(&self, dataset: &OperationalDataset) -> Result

Functional equivalent of otsys::otDatasetSetActive.
Source§

fn dataset_set_pending(&self, dataset: &OperationalDataset) -> Result

Functional equivalent of otsys::otDatasetSetPending.
Source§

fn dataset_get_active_tlvs(&self) -> Result<OperationalDatasetTlvs>

Functional equivalent of otsys::otDatasetGetActiveTlvs.
Source§

fn dataset_set_active_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result

Functional equivalent of otsys::otDatasetSetActiveTlvs.
Source§

fn dataset_get_pending_tlvs(&self) -> Result<OperationalDatasetTlvs>

Functional equivalent of otsys::otDatasetGetPendingTlvs.
Source§

fn dataset_set_pending_tlvs(&self, dataset: &OperationalDatasetTlvs) -> Result

Functional equivalent of otsys::otDatasetSetPendingTlvs.
Source§

fn dataset_send_mgmt_pending_set<'a, F>( &self, dataset: OperationalDataset, dataset_tlvs: &[u8], f: F, ) -> Result
where F: FnOnce(Result) + 'a,

Functional equivalent of otsys::otDatasetSendMgmtPendingSet.
Source§

fn dataset_send_mgmt_pending_set_async( &self, dataset: OperationalDataset, dataset_tlvs: &[u8], ) -> Receiver<Result>

Async version of [dataset_send_mgmt_pending_set].
Source§

impl Debug for Instance

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DnsUpstream for Instance

Source§

fn plat_dns_upstream_query_done( &self, query_context: &PlatDnsUpstreamQuery, response: Box<Message<'_>>, )

Update DNS upstream query done
Source§

impl Dnssd for Instance

Source§

fn dnssd_get_next_query(&self, prev: Option<&DnssdQuery>) -> Option<&DnssdQuery>

Functional equivalent to otDnssdGetNextQuery. Read more
Source§

fn dnssd_query_handle_discovered_host( &self, hostname: &CStr, addresses: &[Ip6Address], ttl: u32, )

Functional equivalent to 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, )

Functional equivalent to otDnssdQueryHandleDiscoveredServiceInstance. Read more
Source§

fn dnssd_query_set_callbacks<'a, F>(&'a self, f: Option<F>)
where F: FnMut(bool, &CStr) + 'a,

Functional equivalent of otsys::otDnssdQuerySetCallbacks. Read more
Source§

fn dnssd_get_counters(&self) -> &DnssdCounters

Functional equivalent of otsys::otDnssdGetCounters.
Source§

fn dnssd_upstream_query_is_enabled(&self) -> bool

Functional equivalent of otsys::otDnssdUpstreamQueryIsEnabled
Source§

fn dnssd_upstream_query_set_enabled(&self, enabled: bool)

Functional equivalent of otsys::otDnssdUpstreamQuerySetEnabled
Source§

impl InfraInterface for Instance

Source§

fn plat_infra_if_on_state_changed(&self, id: u32, is_running: bool)

The infra interface driver calls this method to notify OpenThread of the interface state changes.
Source§

fn plat_infra_if_discover_nat64_prefix_done( &self, infra_if_idx: u32, ip6_prefix: Ip6Prefix, )

The infra interface driver calls this method to notify OpenThread that the discovery of NAT64 prefix is done.
Source§

impl Ip6 for Instance

Source§

fn ip6_send(&self, message: OtMessageBox<'_>) -> Result

Functional equivalent of otsys::otIp6Send.
Source§

fn ip6_send_data(&self, data: &[u8]) -> Result

Similar to [ip6_send()], but takes a byte slice instead of an OtMessageBox.
Source§

fn ip6_send_data_direct(&self, data: &[u8]) -> Result

Similar to [ip6_send_data()], but sends the packet without layer-2 security.
Source§

fn ip6_is_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsEnabled.
Source§

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

Functional equivalent of otsys::otIp6SetEnabled.
Source§

fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result

Functional equivalent of otsys::otIp6AddUnicastAddress.
Source§

fn ip6_remove_unicast_address(&self, addr: &Ipv6Addr) -> Result

Functional equivalent of otsys::otIp6RemoveUnicastAddress.
Source§

fn ip6_join_multicast_group(&self, addr: &Ipv6Addr) -> Result

Functional equivalent of otsys::otIp6SubscribeMulticastAddress.
Source§

fn ip6_leave_multicast_group(&self, addr: &Ipv6Addr) -> Result

Functional equivalent of otsys::otIp6UnsubscribeMulticastAddress.
Source§

fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)
where F: FnMut(OtMessageBox<'_>) + 'a,

Sets the IPv6 receive callback closure. Functional equivalent of otsys::otIp6SetReceiveCallback. Read more
Source§

fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
where F: for<'r> FnMut(Ip6AddressInfo<'r>, bool) + 'a,

Sets the IPv6 address callback closure. Functional equivalent of otsys::otIp6SetAddressCallback. Read more
Source§

fn ip6_is_slaac_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsSlaacEnabled.
Source§

fn ip6_set_slaac_enabled(&self, enabled: bool)

Functional equivalent of otsys::otIp6SetSlaacEnabled.
Source§

fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode

Functional equivalent of otsys::otIcmp6GetEchoMode.
Source§

fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)

Functional equivalent of otsys::otIcmp6SetEchoMode.
Source§

fn ip6_set_receive_filter_enabled(&self, enabled: bool)

Functional equivalent of otsys::otIp6SetReceiveFilterEnabled.
Source§

fn ip6_is_receive_filter_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsReceiveFilterEnabled.
Source§

fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters

Functional equivalent of otsys::otIp6GetBorderRoutingCounters.
Source§

fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_>

Functional equivalent of otsys::otIp6GetUnicastAddresses.
Source§

impl Joiner for Instance

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

Functional equivalent of otsys::otJoinerStart.
Source§

fn joiner_stop(&self)

Functional equivalent of otsys::otJoinerStop.
Source§

fn joiner_get_state(&self) -> JoinerState

Functional equivalent of otsys::otJoinerGetState.
Source§

fn joiner_start_async( &self, pskd: &str, provisioning_url: Option<&str>, vendor_name: Option<&str>, vendor_model: Option<&str>, vendor_sw_version: Option<&str>, vendor_data: Option<&str>, ) -> Receiver<Result>

Similar to [joiner_start()], but as an async method. Read more
Source§

fn get_channel(&self) -> ChannelIndex

Functional equivalent of otsys::otLinkGetChannel.
Source§

fn set_channel(&self, index: ChannelIndex) -> Result

Functional equivalent of otsys::otLinkSetChannel.
Functional equivalent of otsys::otLinkGetCounters.
Source§

fn get_extended_address(&self) -> &ExtAddress

Functional equivalent of otsys::otLinkGetExtendedAddress.
Source§

fn get_factory_assigned_ieee_eui_64(&self) -> ExtAddress

Source§

fn get_pan_id(&self) -> PanId

Functional equivalent of otsys::otLinkGetPanId.
Source§

fn set_pan_id(&self, pan_id: PanId) -> Result

Functional equivalent of otsys::otLinkSetPanId.
Source§

fn get_short_address(&self) -> ShortAddress

Functional equivalent of otsys::otLinkGetShortAddress.
Functional equivalent of otsys::otLinkIsEnabled.
Functional equivalent of otsys::otLinkSetEnabled.
Functional equivalent of otsys::otLinkIsPromiscuous.
Functional equivalent of otsys::otLinkSetPromiscuous.
Source§

fn is_energy_scan_in_progress(&self) -> bool

Functional equivalent of otsys::otLinkIsEnergyScanInProgress.
Source§

fn is_active_scan_in_progress(&self) -> bool

Functional equivalent of otsys::otLinkIsActiveScanInProgress.
Source§

fn get_supported_channel_mask(&self) -> ChannelMask

Functional equivalent of otsys::otLinkGetSupportedChannelMask.
Source§

fn start_active_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
where F: FnMut(Option<&ActiveScanResult>) + 'a,

Starts an active scan. Functional equivalent of otsys::otLinkActiveScan. Read more
Source§

fn start_energy_scan<'a, F>( &self, channels: ChannelMask, dwell: Duration, f: F, ) -> Result
where F: FnMut(Option<&EnergyScanResult>) + 'a,

Starts an energy scan. Functional equivalent of otsys::otLinkEnergyScan. Read more
Source§

impl LinkMetrics for Instance

Get Link Metrics Manager enabled/disabled state.
Enable or disable Link Metrics Manager.
Get Link Metrics data of a neighbor by its extended address.
Source§

impl MessageBuffer for Instance

Source§

impl Nat64 for Instance

Source§

fn nat64_set_enabled(&self, enabled: bool)

Enable or disable NAT64 functions.
Source§

fn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result

Sets the CIDR used when setting the source address of the outgoing translated IPv4 packets.
Source§

fn nat64_get_cidr(&self) -> Result<Ip4Cidr>

Get CIDR from OpenThread
Source§

fn nat64_set_receive_fn<'a, F>(&'a self, f: Option<F>)
where F: FnMut(OtMessageBox<'_>) + 'a,

Registers a callback to provide received IPv4 datagrams.
Source§

fn nat64_send(&self, message: OtMessageBox<'_>) -> Result

Send a message to NAT64 handler in OpenThread
Source§

fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result

Send data to NAT64 handler in OpenThread
Source§

fn nat64_infra_if_prefix_discover_done( &self, infra_if_idx: NetifIndex, ip6_prefix: otIp6Prefix, )

Return AIL prefix to OpenThread
Source§

fn nat64_init_address_mapping_iterator( &self, iter: &mut otNat64AddressMappingIterator, )

Init the NAT64 address mapping iterator
Source§

fn nat64_get_next_address_mapping( &self, iter: &mut otNat64AddressMappingIterator, mapping: &mut Nat64AddressMapping, ) -> Result

Get next NAT64 address mapping
Source§

fn nat64_get_translator_state(&self) -> Nat64State

Get NAT64 translator state
Source§

fn nat64_get_prefix_manager_state(&self) -> Nat64State

Get NAT64 prefix manager state
Source§

fn nat64_get_error_counters(&self) -> Nat64ErrorCounters

Get NAT64 error counters
Source§

fn nat64_get_counters(&self) -> Nat64ProtocolCounters

Get NAT64 protocol counters
Source§

fn nat64_get_address_mapping_iterator( &self, ) -> Nat64AddressMappingIterator<'_, Self>

Get the NAT64 address mapping iterator instance
Source§

impl NetData for Instance

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.
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.
Source§

impl PlatTrel for Instance

Source§

fn plat_trel_handle_received(&self, packet: &[u8])

This function is a callback from platform to notify of a received TREL UDP packet.
Source§

fn plat_trel_handle_discovered_peer_info( &self, peer_info: &PlatTrelPeerInfo<'_>, )

This is a callback function from platform layer to report a discovered TREL peer info.
Source§

impl ProcessPollAsync for Instance

Source§

fn process_poll(&self, cx: &mut Context<'_>) -> Poll<Option<()>>

Processes all tasks that need to be handled for this instance, including those from the platform implementation.
Source§

impl Radio for Instance

Source§

impl Reset for Instance

Source§

fn reset(&self)

Functional equivalent of otsys::otInstanceReset.
Source§

fn factory_reset(&self)

Functional equivalent of otsys::otInstanceFactoryReset.
Source§

fn erase_persistent_info(&self) -> Result

Functional equivalent of otsys::otInstanceErasePersistentInfo.
Source§

impl SrpServer for Instance

Source§

fn srp_server_get_address_mode(&self) -> SrpServerAddressMode

Functional equivalent of otsys::otSrpServerGetAddressMode.
Source§

fn srp_server_get_state(&self) -> SrpServerState

Functional equivalent of otsys::otSrpServerGetState.
Source§

fn srp_server_get_port(&self) -> u16

Functional equivalent of otsys::otSrpServerGetPort.
Source§

fn srp_server_set_auto_enable_mode(&self, enabled: bool)

Functional equivalent of otsys::otSrpServerSetEnabled.
Source§

fn srp_server_set_enabled(&self, enabled: bool)

Functional equivalent of otsys::otSrpServerSetEnabled.
Source§

fn srp_server_is_enabled(&self) -> bool

Returns true if the SRP server is enabled.
Source§

fn srp_server_is_auto_enable_mode(&self) -> bool

Returns true if SRP server auto-enable mode is enabled.
Source§

fn srp_server_is_running(&self) -> bool

Returns true if the SRP server is running, false if it is stopped or disabled.
Source§

fn srp_server_set_domain(&self, domain: &CStr) -> Result

Functional equivalent of otsys::otSrpServerSetDomain.
Source§

fn srp_server_get_domain(&self) -> &CStr

Functional equivalent of otsys::otSrpServerGetDomain.
Source§

fn srp_server_get_response_counters(&self) -> &SrpServerResponseCounters

Functional equivalent of otsys::otSrpServerGetResponseCounters.
Source§

fn srp_server_next_host<'a>( &'a self, prev: Option<&'a SrpServerHost>, ) -> Option<&'a SrpServerHost>

Functional equivalent of otsys::otSrpServerGetNextHost.
Source§

fn srp_server_handle_service_update_result( &self, id: SrpServerServiceUpdateId, result: Result, )

Source§

fn srp_server_set_service_update_fn<'a, F>(&'a self, f: Option<F>)

Source§

fn srp_server_hosts(&self) -> SrpServerHostIterator<'_, Self>
where Self: Sized,

Returns an iterator over the SRP hosts.
Source§

impl State for Instance

Source§

fn set_state_changed_fn<F>(&self, f: Option<F>)
where F: FnMut(ChangedFlags) + 'static,

Functional equivalent to otsys::otSetStateChangedCallback.
Source§

fn state_changed_stream(&self) -> StateChangedStream

Returns an asynchronous stream for state-change events.
Source§

impl Tasklets for Instance

Source§

fn set_waker(&self, waker: Waker)

Sets the waker to be used to wake up the tasklet future.
Source§

fn wake_waker(&self)

Wakes the waker previously passed to [set_waker].
Source§

fn process(&self)

Functional equivalent to otsys::otTaskletsProcess.
Source§

fn has_pending(&self) -> bool

Functional equivalent to otsys::otTaskletsHasPending.
Source§

impl Thread for Instance

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.
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.
Source§

impl Trel for Instance

Source§

fn trel_set_enabled(&self, enabled: bool)

Enables or disables TREL operation.
Source§

fn trel_is_enabled(&self) -> bool

Returns true if TREL is enabled.
Source§

fn trel_get_counters(&self) -> Option<&TrelCounters>

Return all the TREL counters
Source§

fn trel_reset_counters(&self)

Reset TREL counters
Source§

fn trel_get_number_of_peers(&self) -> u16

Return the count of TREL peer
Source§

impl Udp for Instance

Source§

fn udp_get_sockets(&self) -> UdpSocketIterator<'_>

Functional equivalent of otsys::otUdpGetSockets.
Source§

impl Uptime for Instance

Source§

impl InstanceInterface for Instance

Source§

impl Send for Instance

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DnssdExt for T
where T: Dnssd,

Source§

fn dnssd_queries(&self) -> DnssdQueryIterator<'_, Self>
where Self: Sized,

Iterator for easily iterating over all of the DNS-SD queries.
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more