Skip to main content

Capabilities

Struct Capabilities 

Source
pub struct Capabilities<'a> {
    pub scan_max_time_seconds: u8,
    pub connect_max_time_seconds: u8,
    pub wifi_bands: &'a [WiFiBand],
    pub thread_features: ThreadCapabilities,
    pub thread_version: u16,
}
Expand description

The fixed capabilities an instance reports, beyond its network list.

§11.9.6.3 and §11.9.6.4’s timings are WI | TH and have no fallback, so a device has to state them: ScanMaxTimeSeconds is “the maximum duration taken, in seconds, by the network interface … to provide scan results”, and ConnectMaxTimeSeconds the same for a connection, accounting for “obtaining IP addresses, or the execution of necessary internal retries”. A commissioner sizes its fail-safe from them.

Fields§

§scan_max_time_seconds: u8

ScanMaxTimeSeconds (§11.9.6.3).

§connect_max_time_seconds: u8

ConnectMaxTimeSeconds (§11.9.6.4).

§wifi_bands: &'a [WiFiBand]

SupportedWiFiBands (§11.9.6.9) — min 1 entry on a Wi-Fi instance.

§thread_features: ThreadCapabilities

SupportedThreadFeatures (§11.9.6.10).

§thread_version: u16

ThreadVersion (§11.9.6.11) — “the value mapping found in the ‘Version TLV’ section of Thread specification. For example, Thread 1.3.0 would have ThreadVersion set to 4.”

Trait Implementations§

Source§

impl<'a> Clone for Capabilities<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for Capabilities<'a>

Source§

impl<'a> Debug for Capabilities<'a>

Source§

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

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

impl Default for Capabilities<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Capabilities<'a>

§

impl<'a> Freeze for Capabilities<'a>

§

impl<'a> Move for Capabilities<'a>

§

impl<'a> RefUnwindSafe for Capabilities<'a>

§

impl<'a> Send for Capabilities<'a>

§

impl<'a> Sync for Capabilities<'a>

§

impl<'a> Unpin for Capabilities<'a>

§

impl<'a> UnsafeUnpin for Capabilities<'a>

§

impl<'a> UnwindSafe for Capabilities<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.