pub enum AuthMethod {
BasicAuth {
api_key: String,
api_secret: String,
},
BearerToken {
token: String,
},
}Expand description
How the client authenticates.
An enum rather than two Option fields: two Options make four states, of
which two (“both set” and “neither set”) are invalid. This makes those
unrepresentable.
Variants§
BasicAuth
HTTP Basic auth with an API key pair — the usual mode.
Fields
BearerToken
Bearer token auth, used for OAuth-issued access tokens.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§impl Debug for AuthMethod
impl Debug for AuthMethod
impl Eq for AuthMethod
Source§impl PartialEq for AuthMethod
impl PartialEq for AuthMethod
impl StructuralPartialEq for AuthMethod
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnsafeUnpin for AuthMethod
impl UnwindSafe for AuthMethod
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.