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_config<C: Config>() -> Self

The values a node with this Config actually guarantees.

§11.1.4.4 marks SimultaneousInvocationsSupported, SimultaneousWritesSupported, ReadPathsSupported and SubscribePathsSupported mandatory from cluster revision 6, and this cluster declares revision 6 — so CapabilityMinima::default, which leaves them absent, describes a node of an older revision than the one it claims to be.

They are computed here rather than asked of the integrator because the integrator does not know them: they are Config’s own limits, and a hand-written number beside a Config is a number that stops being true the first time the Config changes. This is the same rule as config::MAX_UDP_PAYLOAD and operational_credentials::max_nocs_len — where only the library can compute a bound, the library states it.

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) -> CapabilityMinima

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: &CapabilityMinima) -> 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.