#[non_exhaustive]pub enum AuthScope {
Read,
Admin,
}Expand description
Who is allowed to call a Capability.
#[non_exhaustive]: a future third tier (e.g. a scope narrower than
Admin for a specific subsystem) should not be a downstream semver
break. See Capability::auth_scope for the important caveat that this
crate does not itself enforce this scope.
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.
Read
Read-only; safe for any authenticated caller.
Admin
Mutates controller state; callers should gate this behind an explicit admin/write permission.
Implementations§
Trait Implementations§
impl Copy for AuthScope
impl Eq for AuthScope
impl StructuralPartialEq for AuthScope
Auto Trait Implementations§
impl Freeze for AuthScope
impl RefUnwindSafe for AuthScope
impl Send for AuthScope
impl Sync for AuthScope
impl Unpin for AuthScope
impl UnsafeUnpin for AuthScope
impl UnwindSafe for AuthScope
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.