pub struct NacmRuleList {
pub name: String,
pub groups: Vec<String>,
pub rules: Vec<NacmRule>,
pub command_rules: Vec<NacmCommandRule>,
}Expand description
NACM Rule List with associated groups
A rule list is a named collection of rules that applies to specific user groups. Rule lists are processed in order, and within each list, rules are ordered by priority.
§Fields
name- Identifier for this rule listgroups- User groups this rule list applies torules- Ordered list of access control rulescommand_rules- Ordered list of command access control rules (Tail-f extension)
§Examples
use nacm_validator::{NacmRuleList, NacmRule, NacmCommandRule, RuleEffect, Operation};
use std::collections::HashSet;
let rule_list = NacmRuleList {
name: "admin-rules".to_string(),
groups: vec!["admin".to_string()],
rules: vec![], // Would contain actual rules
command_rules: vec![], // Would contain command rules
};Fields§
§name: StringName of this rule list
groups: Vec<String>User groups this rule list applies to
rules: Vec<NacmRule>Ordered list of rules in this list
command_rules: Vec<NacmCommandRule>Ordered list of command rules in this list (Tail-f extension)
Trait Implementations§
Source§impl Clone for NacmRuleList
impl Clone for NacmRuleList
Source§fn clone(&self) -> NacmRuleList
fn clone(&self) -> NacmRuleList
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NacmRuleList
impl RefUnwindSafe for NacmRuleList
impl Send for NacmRuleList
impl Sync for NacmRuleList
impl Unpin for NacmRuleList
impl UnwindSafe for NacmRuleList
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more