#[non_exhaustive]pub enum AccessTier {
Anon,
Read,
Write,
Approve,
}Expand description
Access tier granted to a caller after token verification.
Tiers are linearly inclusive: Approve covers Write, Write covers
Read, Read covers Anon. Each engine operation declares the minimum
tier it requires; lower tiers fail with crate::EngineError::Auth.
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.
Anon
No token presented. Allowed only on public reads when no read token is configured.
Read
Read token. Allowed: read, list, subscribe, audit verify.
Write
Write token. Allowed: everything Read plus ordinary replace/append
in home/, tmp/, dev/, sys/, and non-log var/.
Approve
Approve token. Allowed: everything Write plus delete + writes into
protected namespaces (etc/, lib/, boot/, usr/, var/log/).
Trait Implementations§
Source§impl Clone for AccessTier
impl Clone for AccessTier
Source§fn clone(&self) -> AccessTier
fn clone(&self) -> AccessTier
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AccessTier
Source§impl Debug for AccessTier
impl Debug for AccessTier
impl Eq for AccessTier
Source§impl PartialEq for AccessTier
impl PartialEq for AccessTier
Source§fn eq(&self, other: &AccessTier) -> bool
fn eq(&self, other: &AccessTier) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AccessTier
Auto Trait Implementations§
impl Freeze for AccessTier
impl RefUnwindSafe for AccessTier
impl Send for AccessTier
impl Sync for AccessTier
impl Unpin for AccessTier
impl UnsafeUnpin for AccessTier
impl UnwindSafe for AccessTier
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