#[non_exhaustive]pub enum Credentials {
Basic {
user: String,
password: SecretString,
},
OAuth(Arc<dyn TokenProvider>),
}Expand description
The credentials the client presents on every request.
Every secret is a SecretString, so neither a Debug rendering nor a
log line can carry it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Basic
RFC 7617 basic authentication.
OAuth(Arc<dyn TokenProvider>)
An RFC 6750 bearer token the provider obtains with the OAuth 2.0
client credentials grant (RFC 6749 §4.4), renewed once when the server
answers 401.
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Auto Trait Implementations§
impl !RefUnwindSafe for Credentials
impl !UnwindSafe for Credentials
impl Freeze for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnsafeUnpin for Credentials
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