#[non_exhaustive]pub struct Entry {
pub principal: Principal,
pub effect: Effect,
pub rights: Vec<String>,
pub inherit: Inherit,
pub inherited: bool,
pub condition: Option<String>,
}Expand description
One line of an ACL: who, allow or deny, which rights, and how it is inherited.
rights are names a RightsSchema defines (rights or aliases),
compiled when the ACL is checked. As configuration the principal is its text:
{ "principal": "group:staff", "effect": "deny", "rights": ["write"],
"inherit": { "items": true, "containers": true } }Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.principal: PrincipalWho it applies to.
effect: EffectAllow (the default) or deny.
rights: Vec<String>The rights and aliases it names.
inherit: InheritHow it passes to what the item contains.
inherited: boolWhether it was copied from a parent (Acl::inherited_by) rather than set here.
condition: Option<String>A condition the consumer’s Conditions decides; none means it
always applies.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn allow(
principal: impl Into<Principal>,
rights: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn allow( principal: impl Into<Principal>, rights: impl IntoIterator<Item = impl Into<String>>, ) -> Self
An entry allowing rights to principal, inherited by nothing.
Trait Implementations§
Source§impl Describe for Entry
impl Describe for Entry
impl Eq for Entry
Source§impl Extend<Entry> for Acl
impl Extend<Entry> for Acl
Source§fn extend<I: IntoIterator<Item = Entry>>(&mut self, entries: I)
fn extend<I: IntoIterator<Item = Entry>>(&mut self, entries: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
impl Fields for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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