Skip to main content

BasicCommData

Struct BasicCommData 

Source
pub struct BasicCommData {
    pub password: CryptoSensitive<rs_matter_pairing::::Spake2pVerifierPassword::{constant#0}>,
    pub discriminator: u16,
}
Expand description

The passcode and the discriminator: what the onboarding payloads carry.

Fields§

§password: CryptoSensitive<rs_matter_pairing::::Spake2pVerifierPassword::{constant#0}>

The passcode, which commissioners authenticate the device with

§discriminator: u16

The 12-bit discriminator used to differentiate between multiple devices

Implementations§

Source§

impl BasicCommData

Source

pub fn compute_pairing_code( &self, ) -> StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 11]>>

Compute the 11-digit manual pairing code (no vendor/product IDs)

Implies the standard commissioning flow; other flows need Self::compute_pairing_code_long.

Source

pub fn compute_pairing_code_long( &self, vid: u16, pid: u16, ) -> StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 21]>>

Compute the 21-digit manual pairing code, which carries the vendor and product IDs; required for non-standard commissioning flows

Source

pub fn compute_pretty_pairing_code( &self, ) -> StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 13]>>

The 11-digit manual pairing code grouped for display: XXXX-XXX-XXXX

Source

pub fn compute_pretty_pairing_code_long( &self, vid: u16, pid: u16, ) -> StringInner<usize, VecStorageInner<[MaybeUninit<u8>; 25]>>

The 21-digit manual pairing code grouped for display: XXXX-XXX-XXXX-XXXXX-XXXXX (the spec prescribes no grouping)

Trait Implementations§

Source§

impl Clone for BasicCommData

Source§

fn clone(&self) -> BasicCommData

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 Debug for BasicCommData

Source§

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

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

impl From<BasicCommData> for DevCommData<'_>

Source§

fn from(data: BasicCommData) -> DevCommData<'_>

Converts to this type from the input type.

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> 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> Init<T> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), !>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. 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.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, I> IntoFallibleInit<T> for I
where I: Init<T>,

Source§

fn into_fallible<E>(self) -> impl Init<T, E>

Convert the infallible initializer to a fallible one.
Source§

impl<T> Loggable for T
where T: Debug + ?Sized,

Source§

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

Source§

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

Source§

impl<T> PinInit<T> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
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.