Skip to main content

CapabilityMinima

Struct CapabilityMinima 

Source
pub struct CapabilityMinima {
    pub case_sessions_per_fabric: u16,
    pub subscriptions_per_fabric: u16,
    pub simultaneous_invocations: Option<u16>,
    pub simultaneous_writes: Option<u16>,
    pub read_paths: Option<u16>,
    pub subscribe_paths: Option<u16>,
}
Expand description

CapabilityMinimaStruct (§11.1.4.4) — “the minimum guaranteed value for some system-wide resource capabilities”.

The last four fields arrived in cluster revision 6, where §11.1.4.4 makes them mandatory. They are Option so that a node declaring an older ClusterRevision can omit them — this crate declares revision 6, so its own defaults fill them in.

Fields§

§case_sessions_per_fabric: u16

CaseSessionsPerFabric [0] — 3 to 10000, fallback 3. “SHALL NOT be smaller than the required minimum indicated in Section 4.14.2.8”.

§subscriptions_per_fabric: u16

SubscriptionsPerFabric [1] — 3 to 10000, fallback 3.

§simultaneous_invocations: Option<u16>

SimultaneousInvocationsSupported [2] — 1 to 10000, revision 6.

§simultaneous_writes: Option<u16>

SimultaneousWritesSupported [3] — 1 to 10000, revision 6.

§read_paths: Option<u16>

ReadPathsSupported [4] — 9 to 10000, revision 6. §2.11.2.1’s read limit.

§subscribe_paths: Option<u16>

SubscribePathsSupported [5] — 3 to 10000, revision 6. §2.11.2.2’s subscribe limit.

Implementations§

Source§

impl CapabilityMinima

Source

pub const fn from_tables<C, S, B>() -> Self

The values a node actually guarantees, taken from the tables that will answer for them.

§11.1.4.4 says each field “SHALL indicate the actual” number the node supports, so every one of them has exactly one honest source: the table. S is the session table and B the subscription table, both of which publish their real capacity through Capacity; read_paths is Config::READ_PATHS, the one figure here that is a promise about work rather than storage.

use matter_kit::clusters::basic_information::CapabilityMinima;
use matter_kit::{DefaultConfig, im::SubscriptionTable, session::SessionTable};

type Sessions = SessionTable<DefaultConfig, 16>;
type Subs = SubscriptionTable<DefaultConfig>;
let minima = CapabilityMinima::from_tables::<DefaultConfig, Sessions, Subs>();
assert_eq!(minima.case_sessions_per_fabric, 3); // 16 sessions over 5 fabrics

There is deliberately no from_config. A Config cannot size a table, so a figure derived from one describes whatever the integrator wrote next to it — and this attribute is read during certification.

SimultaneousInvocationsSupported and SimultaneousWritesSupported take the specification’s floor of 1: this crate serves one interaction at a time per exchange, and §8.8.2.3’s MaxPathsPerInvoke — a separate attribute — is what bounds the paths inside one of them.

Trait Implementations§

Source§

impl Clone for CapabilityMinima

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 Copy for CapabilityMinima

Source§

impl Debug for CapabilityMinima

Source§

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

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

impl Default for CapabilityMinima

Source§

fn default() -> Self

§11.1.4.4’s fallbacks and floors, every field present.

Revision 6’s four fields are not left absent, because this cluster declares revision 6 and §11.1.4.4 makes them mandatory there — a struct that omits them describes an older node than the one sending it, which TC_IDM_2_3 checks directly.

Source§

impl Eq for CapabilityMinima

Source§

impl PartialEq for CapabilityMinima

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CapabilityMinima

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