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>) -> Self
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>) -> Self
pub fn with_http_status(self, status: Option<u16>) -> Self
The same failure carrying status (kept when a caller rewords the
message).
Source§impl RefreshFailure
impl RefreshFailure
Sourcepub fn transport(message: impl Into<String>) -> Self
pub fn transport(message: impl Into<String>) -> Self
The request produced no usable response (connect, TLS, timeout, a body cut mid-transfer).
Sourcepub fn status(status: u16, message: impl Into<String>) -> Self
pub fn status(status: u16, message: impl Into<String>) -> Self
The token endpoint answered status; see [status_kind].
Sourcepub fn bad_response(message: impl Into<String>) -> Self
pub fn bad_response(message: impl Into<String>) -> Self
A success status whose body is not a usable token response.
Sourcepub fn credential(message: impl Into<String>) -> Self
pub fn credential(message: impl Into<String>) -> Self
The stored login is missing or was rejected.
Trait Implementations§
Source§impl Clone for RefreshFailure
impl Clone for RefreshFailure
Source§impl Debug for RefreshFailure
impl Debug for RefreshFailure
Source§impl Display for RefreshFailure
impl Display for RefreshFailure
impl Eq for RefreshFailure
Source§impl From<RefreshFailure> for String
impl From<RefreshFailure> for String
Source§fn from(f: RefreshFailure) -> Self
fn from(f: RefreshFailure) -> Self
Converts to this type from the input type.
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§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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.