pub struct RefreshFailure {
pub kind: RefreshFailureKind,
/* private fields */
}Expand description
A refresh failure: its kind plus a log-safe message (our own texts, or provider errors that went through the provider’s sanitizer) and, when the token endpoint answered with a failure, its HTTP status. Never carries token material.
Fields§
§kind: RefreshFailureKindImplementations§
Source§impl RefreshFailure
impl RefreshFailure
pub fn new( kind: RefreshFailureKind, message: impl Into<String>, ) -> RefreshFailure
pub fn message(&self) -> &str
Sourcepub fn http_status(&self) -> Option<u16>
pub fn http_status(&self) -> Option<u16>
The token endpoint’s HTTP status, when it answered with a failure.
Sourcepub fn with_http_status(self, status: Option<u16>) -> RefreshFailure
pub fn with_http_status(self, status: Option<u16>) -> RefreshFailure
The same failure carrying status (kept when a caller rewords the
message).
Source§impl RefreshFailure
impl RefreshFailure
Sourcepub fn transport(message: impl Into<String>) -> RefreshFailure
pub fn transport(message: impl Into<String>) -> RefreshFailure
The request produced no usable response (connect, TLS, timeout, a body cut mid-transfer).
Sourcepub fn status(status: u16, message: impl Into<String>) -> RefreshFailure
pub fn status(status: u16, message: impl Into<String>) -> RefreshFailure
The token endpoint answered status; see [status_kind].
Sourcepub fn bad_response(message: impl Into<String>) -> RefreshFailure
pub fn bad_response(message: impl Into<String>) -> RefreshFailure
A success status whose body is not a usable token response.
Sourcepub fn credential(message: impl Into<String>) -> RefreshFailure
pub fn credential(message: impl Into<String>) -> RefreshFailure
The stored login is missing or was rejected.
Sourcepub fn other(message: impl Into<String>) -> RefreshFailure
pub fn other(message: impl Into<String>) -> RefreshFailure
A local or configuration failure (pinning, client build).
Trait Implementations§
Source§impl Clone for RefreshFailure
impl Clone for RefreshFailure
Source§fn clone(&self) -> RefreshFailure
fn clone(&self) -> RefreshFailure
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 RefreshFailure
impl Debug for RefreshFailure
Source§impl Display for RefreshFailure
impl Display for RefreshFailure
impl Eq for RefreshFailure
Source§impl From<StoreError> for RefreshFailure
A store lock that stayed held past its deadline is a local failure
(Other, retry shortly); any other store failure keeps the credential
classification.
impl From<StoreError> for RefreshFailure
A store lock that stayed held past its deadline is a local failure
(Other, retry shortly); any other store failure keeps the credential
classification.
Source§fn from(e: StoreError) -> RefreshFailure
fn from(e: StoreError) -> RefreshFailure
Source§impl From<String> for RefreshFailure
Storage / load / CAS errors (strings from the storage layer and our own
slot checks) are credential problems.
impl From<String> for RefreshFailure
Storage / load / CAS errors (strings from the storage layer and our own slot checks) are credential problems.
Source§fn from(message: String) -> RefreshFailure
fn from(message: String) -> RefreshFailure
Source§impl PartialEq for RefreshFailure
impl PartialEq for RefreshFailure
impl StructuralPartialEq for RefreshFailure
Auto Trait Implementations§
impl Freeze for RefreshFailure
impl RefUnwindSafe for RefreshFailure
impl Send for RefreshFailure
impl Sync for RefreshFailure
impl Unpin for RefreshFailure
impl UnsafeUnpin for RefreshFailure
impl UnwindSafe for RefreshFailure
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