pub enum TokenScope {
Owner,
Project,
Read,
}Expand description
What a token grants.
Variants§
Owner
Full surface (ADR-102 D4).
Project
A per-project child kernel’s credential (ADR-103 A6, Phase 2 G):
read and write only, never Admin, bound to one project by
TokenInfo::project. It cannot mint, revoke or list tokens and
reaches no Admin-gated method.
Read
A read-only operator credential (ADR-102 D4 amendment): Read only,
never Write or Admin. The gateway opens only its GET read routes to
it, so a console need not hold an owner-equivalent token. It may also
carry a project (TokenInfo::project): the daemon then treats the
caller as that project’s (fleet snapshot filtered) and the gateway
confines it to that project.
Implementations§
Source§impl TokenScope
impl TokenScope
Sourcepub fn capability_scopes(self) -> &'static [&'static str]
pub fn capability_scopes(self) -> &'static [&'static str]
The literal capability scopes this token grants (see
capability::CallerCapabilities::from_scopes in the weave crate).
Trait Implementations§
Source§impl Clone for TokenScope
impl Clone for TokenScope
impl Copy for TokenScope
Source§impl Debug for TokenScope
impl Debug for TokenScope
impl Eq for TokenScope
Source§impl PartialEq for TokenScope
impl PartialEq for TokenScope
Source§impl Serialize for TokenScope
impl Serialize for TokenScope
impl StructuralPartialEq for TokenScope
Auto Trait Implementations§
impl Freeze for TokenScope
impl RefUnwindSafe for TokenScope
impl Send for TokenScope
impl Sync for TokenScope
impl Unpin for TokenScope
impl UnsafeUnpin for TokenScope
impl UnwindSafe for TokenScope
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more