pub struct Entry<const S: usize, const T: usize> {
pub fabric_index: FabricIndex,
pub privilege: Privilege,
pub auth_mode: AuthMode,
pub subjects: Vec<NodeId, S>,
pub targets: Vec<Target, T>,
}Expand description
One access control entry (§9.10.5.7’s AccessControlEntryStruct).
S and T bound the subject and target lists, and are exactly what §9.10.6.5’s
SubjectsPerAccessControlEntry and §9.10.6.6’s TargetsPerAccessControlEntry report —
constrained to 4..=65534 and 3..=65534, which Acl::CHECK holds them to. They default
to those minima.
Fields§
§fabric_index: FabricIndexThe fabric this entry belongs to, and the only one that can see it.
privilege: PrivilegePrivilege [1] — what this entry grants.
auth_mode: AuthModeAuthMode [2] — the authentication mode it applies to.
subjects: Vec<NodeId, S>Subjects [3] — who. Empty is a wildcard, not an empty set.
targets: Vec<Target, T>Targets [4] — what. Empty is a wildcard, not an empty set.
Implementations§
Source§impl<const S: usize, const T: usize> Entry<S, T>
impl<const S: usize, const T: usize> Entry<S, T>
Sourcepub fn case(fabric_index: FabricIndex, privilege: Privilege) -> Self
pub fn case(fabric_index: FabricIndex, privilege: Privilege) -> Self
An entry granting privilege to CASE subjects on fabric, wildcard in both lists.
Sourcepub fn with_subject(self, subject: NodeId) -> Result<Self>
pub fn with_subject(self, subject: NodeId) -> Result<Self>
Adds a subject, which narrows the entry from its wildcard.
A CAT is carried as its §6.6.2.1.2 node-id sub-encoding; CaseAuthenticatedTag
produces it.
Sourcepub fn with_target(self, target: Target) -> Result<Self>
pub fn with_target(self, target: Target) -> Result<Self>
Adds a target, which narrows the entry from its wildcard.