#[non_exhaustive]pub enum BrokerError {
Show 14 variants
UnknownProvider(String),
RegistrationRequired {
provider: String,
remediation: String,
},
NotConfigured(String),
Unauthorized,
Denied(String),
UnsupportedCapability {
provider: String,
capability: String,
},
Transport(String),
Credential(String),
UnknownAccount {
provider: String,
label: String,
},
UnsupportedAccount {
provider: String,
label: String,
},
InvalidAccount(String),
NoAccountAvailable {
provider: String,
reason: String,
failure: Option<SelectionFailure>,
},
BrokerTooOld(String),
Refresh(RefreshFailure),
}Expand description
Broker failures. Messages never contain credential values. Non-exhaustive: new failure kinds are added as brokers gain operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownProvider(String)
The named provider is not in any broker registry.
RegistrationRequired
A required public-client registration is not configured.
NotConfigured(String)
The provider is known but has no credential configured.
The caller failed broker (machine) authentication.
Denied(String)
The request was rejected by broker policy (e.g. malformed proxy path).
UnsupportedCapability
The route honestly lacks a capability the request needs (e.g. tools on a text-only cloud route). Raised pre-flight, before credentials/network.
Transport(String)
Transport-level failure talking to the broker or the provider.
Credential(String)
Credential storage/refresh failure (message is already secret-free).
UnknownAccount
An explicitly requested account slot does not exist. Never a fallback.
UnsupportedAccount
This broker implementation cannot address named account slots.
InvalidAccount(String)
An account label failed validation (CLI/env/config/HTTP boundary).
NoAccountAvailable
Automatic selection found no account with proven capacity. failure
is the typed explanation (top-level kind plus every account’s kind
and HTTP status) when the broker knows it; reason its text.
BrokerTooOld(String)
The remote broker predates an operation this client needs; the payload names what is unavailable. Upgrade the broker host.
Refresh(RefreshFailure)
A locked token refresh failed; the kind tells a per-account cooldown, a busy refresh lock or a transient network/provider failure apart from an unusable login. Message is secret-free.
Trait Implementations§
Source§impl Clone for BrokerError
impl Clone for BrokerError
Source§fn clone(&self) -> BrokerError
fn clone(&self) -> BrokerError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BrokerError
impl Debug for BrokerError
Source§impl Display for BrokerError
impl Display for BrokerError
impl Eq for BrokerError
Source§impl Error for BrokerError
impl Error for BrokerError
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 From<BrokerError> for SetupError
impl From<BrokerError> for SetupError
Source§fn from(err: BrokerError) -> SetupError
fn from(err: BrokerError) -> SetupError
Source§impl From<BrokerError> for StreamError
impl From<BrokerError> for StreamError
Source§fn from(source: BrokerError) -> StreamError
fn from(source: BrokerError) -> StreamError
Source§impl PartialEq for BrokerError
impl PartialEq for BrokerError
impl StructuralPartialEq for BrokerError
Auto Trait Implementations§
impl Freeze for BrokerError
impl RefUnwindSafe for BrokerError
impl Send for BrokerError
impl Sync for BrokerError
impl Unpin for BrokerError
impl UnsafeUnpin for BrokerError
impl UnwindSafe for BrokerError
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> ThreadSafetyMarker for Twhere
T: Send,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more