pub struct Attributes { /* private fields */ }Expand description
The attribute list for one node, derived from its Product.
§7.13.3’s AttributeList is read by every commissioner, and an entry for an attribute
that answers UNSUPPORTED_ATTRIBUTE — or a served attribute missing from the list — is a
certification failure. So the list is computed from the same record the handler reads
out of, and the two cannot drift.
A fixed array, not a Vec: a node has one of these for its whole life, and
Attributes::cluster borrows from it.
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn new(
product: &Product<'_>,
local_config_disabled: bool,
reachable: bool,
) -> Self
pub fn new( product: &Product<'_>, local_config_disabled: bool, reachable: bool, ) -> Self
The attributes a node serving product has, in ascending id order.
local_config_disabled and reachable are the two optional attributes that are not
decided by Product, because they are state rather than product data — see
BasicInformation::with_local_config_disabled and
BasicInformation::with_reachable.
Sourcepub fn as_slice(&self) -> &[AttributeDescriptor]
pub fn as_slice(&self) -> &[AttributeDescriptor]
The attributes this node serves.
Sourcepub fn cluster(&self) -> ClusterDescriptor<'_>
pub fn cluster(&self) -> ClusterDescriptor<'_>
The cluster descriptor for a node serving these attributes.