Struct openthread::ot::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_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

§

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

fn get_uptime(&self) -> Duration

Functional equivalent of otsys::otInstanceGetUptime.
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> Encode<Ambiguous1> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _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> Encode<Ambiguous2> for T

§

unsafe fn encode( self, _encoder: &mut Encoder<'_>, _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>,

§

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>,

§

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<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