Skip to main content

Device

Struct Device 

Source
pub struct Device<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize>
where C: Config, K: KeyStore, G: Rng, H: ClusterHandler, Ac: AccessList, Gk: GroupKeyStore, Ev: EventLog, V: ChangeLog,
{ pub node: Node<'a>, pub handler: &'a H, pub credentials: &'a OperationalCredentials<'a, C, K, G, F>, pub commissioning: &'a GeneralCommissioning<'a>, pub access_control: &'a Ac, pub group_keys: &'a Gk, pub events: &'a Ev, pub versions: &'a V, pub verifier: &'a Spake2pVerifierData, pub parameters: &'a PbkdfParameters, pub memberships: Option<&'a dyn GroupTable>, }
Available on crate feature rustcrypto only.
Expand description

What the application hands the runtime: its node and the parts the specification makes the node’s to drive.

Built once with a struct literal; every type parameter is inferred, so an application never spells one. The clusters named here must also be in handler — the runtime reaches them directly only for the follow-ups a cluster cannot perform itself: a cluster reports, the node acts.

Fields§

§node: Node<'a>

The node’s endpoints and clusters.

§handler: &'a H

Every cluster instance, routed by endpoint and cluster id.

§credentials: &'a OperationalCredentials<'a, C, K, G, F>

Operational Credentials — and through it the fabric table, the key store, the rng and the fail-safe.

§commissioning: &'a GeneralCommissioning<'a>

General Commissioning — and through it the fail-safe and the commissioning window.

§access_control: &'a Ac

Access Control.

§group_keys: &'a Gk

The group key store Group Key Management serves.

§events: &'a Ev

The event log.

§versions: &'a V

The data versions.

§verifier: &'a Spake2pVerifierData

The SPAKE2+ verifier the passcode was turned into at manufacture.

§parameters: &'a PbkdfParameters

The PBKDF parameters that go with it.

§memberships: Option<&'a dyn GroupTable>

Which groups the node’s endpoints are in, so the driver can join their multicast addresses (§2.5.6.2). None for a node with no Groups cluster.

Trait Implementations§

Source§

impl<C, K, G, H, Ac, Gk, Ev, V, const F: usize> Debug for Device<'_, C, K, G, H, Ac, Gk, Ev, V, F>
where C: Config, K: KeyStore, G: Rng, H: ClusterHandler, Ac: AccessList, Gk: GroupKeyStore, Ev: EventLog, V: ChangeLog,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> !RefUnwindSafe for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> !Send for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> !Sync for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> !UnwindSafe for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> Forget for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> Freeze for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> Move for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> Unpin for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

§

impl<'a, C, K, G, H, Ac, Gk, Ev, V, const F: usize> UnsafeUnpin for Device<'a, C, K, G, H, Ac, Gk, Ev, V, F>

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.