#[non_exhaustive]pub enum Mode {
Ordered,
DenyOverrides,
Additive,
Posix,
MostSpecific,
}Expand description
How an ACL’s entries combine into a decision.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ordered
Windows and NFSv4: entries in order, each right decided by the first entry that names it. An allow before a deny wins that right.
DenyOverrides
Order-free: any applicable deny of a right refuses it, else the union of the allows. The default, since no order can be got wrong.
Additive
NetBox, TrueNAS RBAC: the union of the allows; a deny entry is refused.
Posix
POSIX.1e: the requester’s class decides (owner, then named user, then the owning and named groups, capped by the mask, then everyone); no deny.
MostSpecific
Proxmox: a walk from the root down, a deeper level replacing the one above, a level’s subject entries beating its group entries; no deny, a cancelling name refuses everything.
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
Source§impl Leaf for Mode
impl Leaf for Mode
Source§fn labels() -> &'static [(&'static str, &'static str)]
fn labels() -> &'static [(&'static str, &'static str)]
A label for each fixed text the type names, as
(text, label): what a form shows
beside the text. Only the texts that have a label are listed.§fn same(a: &Self, b: &Self) -> bool
fn same(a: &Self, b: &Self) -> bool
Whether two values are the same setting. Settings are compared after both texts are
parsed into this type, never as the raw input: by default the canonical texts of the two
values are equal, which the round-trip contract makes the type’s own equality. A type
whose equal values can write different texts (
-0.0 and 0.0) overrides it.impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Describe for Twhere
T: Leaf,
impl<T> Describe for Twhere
T: Leaf,
§const LEAF: bool = true
const LEAF: bool = true
The type is one text: a [
Leaf], or an untagged enum whose arms all are. An untagged
enum counts the arms that are not, and holds at most one.§fn description() -> Description
fn description() -> Description
What this type is.