pub struct Target {
pub cluster: Option<ClusterId>,
pub endpoint: Option<EndpointId>,
pub device_type: Option<u32>,
}Expand description
What an entry applies to (§9.10.5.6’s AccessControlTargetStruct).
Every field is nullable and a null one is a wildcard. §6.6.6.2 states two preconditions
the algorithm relies on, both checked by Target::is_valid: a target may not be empty,
and it may not name both an endpoint and a device type — they are two ways of saying
where, and an entry that used both would be asking a question with no defined answer.
Fields§
§cluster: Option<ClusterId>Cluster [0] — which cluster, or every cluster.
endpoint: Option<EndpointId>Endpoint [1] — which endpoint, or every endpoint.
device_type: Option<u32>DeviceType [2] — every endpoint conforming to this device type (§9.5.6.1).
Implementations§
Source§impl Target
impl Target
Sourcepub const fn cluster(cluster: ClusterId) -> Self
pub const fn cluster(cluster: ClusterId) -> Self
A target naming one cluster, anywhere on the node.
Sourcepub const fn endpoint(endpoint: EndpointId) -> Self
pub const fn endpoint(endpoint: EndpointId) -> Self
A target naming one endpoint, every cluster on it.
Sourcepub const fn device_type(device_type: u32) -> Self
pub const fn device_type(device_type: u32) -> Self
A target naming every endpoint that conforms to a device type.
Sourcepub const fn and_cluster(self, cluster: ClusterId) -> Self
pub const fn and_cluster(self, cluster: ClusterId) -> Self
The same target, narrowed to one cluster.