Skip to main content

CommissioningWindow

Struct CommissioningWindow 

Source
pub struct CommissioningWindow { /* private fields */ }
Expand description

The node’s commissioning window.

Implementations§

Source§

impl CommissioningWindow

Source

pub fn install(&mut self, window: OpenWindow)

Installs a window. The cluster that calls this has already checked §11.19’s preconditions; this is the state change they guard.

Source

pub const fn new() -> Self

A closed window — what a device boots with.

Source

pub fn open(&self, now: Instant) -> Option<&OpenWindow>

The window, if one is open as of now.

Expiry is lazy, as everywhere else in this crate: a caller that never asks never learns, and a device drives it from CommissioningWindow::deadline.

Source

pub fn status(&self, now: Instant) -> WindowStatus

WindowStatus (§11.19.7.1).

“This attribute SHALL revert to WindowNotOpen upon expiry of a commissioning window.”

Source

pub fn deadline(&self) -> Option<Instant>

When the window closes, if one is open.

Source

pub fn close(&mut self)

Closes the window and destroys the ephemeral verifier with it.

§11.19.8.1: the verifier “SHALL be deleted by the Node at the end of commissioning or expiration of the OpenCommissioningWindow command”. Dropping EphemeralVerifier is what does it — it is ZeroizeOnDrop, so the material is wiped rather than merely forgotten.

Source

pub fn forget_fabric(&mut self, fabric: FabricIndex)

Clears AdminFabricIndex when the administrator’s fabric is removed (§11.19.7.2).

The vendor id stays: §11.19.7.3 is explicit that it “SHALL NOT be updated”.

Source

pub fn ephemeral(&self, now: Instant) -> Option<&EphemeralVerifier>

The PAKE material a PASE responder should use for this window.

None means “use the device’s own factory verifier” — a Basic window, or no window at all. A device must still check CommissioningWindow::status before accepting a PASE session; this only says which verifier applies.

Trait Implementations§

Source§

impl Debug for CommissioningWindow

Source§

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

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

impl Default for CommissioningWindow

Source§

fn default() -> Self

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

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