pub struct AuthenticatedAgent {
pub agent_id: String,
pub admin: bool,
pub dbs: Option<Vec<String>>,
pub read_only: bool,
pub scope: Scope,
pub subject: Option<String>,
pub token_id: Option<String>,
}Fields§
§agent_id: StringAgent the token was issued for; empty when the token is scoped to databases rather than to one agent.
admin: bool§dbs: Option<Vec<String>>Databases this token may use: exact names or globs where * matches
any run of characters. None means every database (allowed only when
the server does not require the claim).
read_only: boolRead-only tokens may search and read but not write. Same as
scope == Scope::Read.
scope: ScopeWhat the token may do.
subject: Option<String>The token’s sub claim.
token_id: Option<String>The token’s jti claim.
Implementations§
Source§impl AuthenticatedAgent
impl AuthenticatedAgent
Allow or refuse access to database name.
Allow or refuse dropping or backing up database name: admin tokens,
or a token with the maintenance scope whose dbs names the database.
A maintenance token must carry dbs even where the server accepts
unscoped tokens, so it can never drop every database.
Trait Implementations§
Source§impl Clone for AuthenticatedAgent
impl Clone for AuthenticatedAgent
Auto Trait Implementations§
impl Freeze for AuthenticatedAgent
impl RefUnwindSafe for AuthenticatedAgent
impl Send for AuthenticatedAgent
impl Sync for AuthenticatedAgent
impl Unpin for AuthenticatedAgent
impl UnsafeUnpin for AuthenticatedAgent
impl UnwindSafe for AuthenticatedAgent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request