pub enum ScopeParseError {
EmptyEntry,
MissingBearer,
EmptyTenantList,
InvalidTenant(String),
WildcardMixedWithIds,
UnknownKey(String),
}Expand description
Errors produced when parsing a single token entry. The wrapper around
parse_tokens_env turns each into a startup-time tracing::warn!
rather than aborting the process — the gateway prefers to keep the
remaining valid entries.
Variants§
EmptyEntry
The entry was empty after trimming.
MissingBearer
The entry was :tenant=... with no bearer token before the colon.
EmptyTenantList
The entry contained a :tenant= clause with no value after =.
InvalidTenant(String)
The tenant list contained a token that was neither * nor a valid
u64. Carries the offending fragment for diagnostics.
WildcardMixedWithIds
The entry mixed * with explicit tenant ids in the same clause.
Either use tenant=* exactly or list ids; we refuse to silently
promote tenant=1,* to wildcard because the user’s intent is
ambiguous.
UnknownKey(String)
The entry used an unrecognised key after the colon (only tenant= is
supported in v0.4). Carries the offending key.
Trait Implementations§
Source§impl Debug for ScopeParseError
impl Debug for ScopeParseError
Source§impl Display for ScopeParseError
impl Display for ScopeParseError
impl Eq for ScopeParseError
Source§impl Error for ScopeParseError
impl Error for ScopeParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for ScopeParseError
impl PartialEq for ScopeParseError
Source§fn eq(&self, other: &ScopeParseError) -> bool
fn eq(&self, other: &ScopeParseError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ScopeParseError
Auto Trait Implementations§
impl Freeze for ScopeParseError
impl RefUnwindSafe for ScopeParseError
impl Send for ScopeParseError
impl Sync for ScopeParseError
impl Unpin for ScopeParseError
impl UnsafeUnpin for ScopeParseError
impl UnwindSafe for ScopeParseError
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
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
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
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>
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