pub enum AuthMethod {
None,
ApiKey(String),
Token(String),
}Expand description
Authentication method for the client.
Variants§
None
No authentication.
ApiKey(String)
API key authentication (Bearer token).
Token(String)
JWT token authentication (Token header).
Implementations§
Source§impl AuthMethod
impl AuthMethod
Sourcepub fn header_value(&self) -> Option<String>
pub fn header_value(&self) -> Option<String>
Returns the Authorization header value for this auth method.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Source§fn clone(&self) -> AuthMethod
fn clone(&self) -> AuthMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthMethod
impl Debug for AuthMethod
Source§impl Default for AuthMethod
impl Default for AuthMethod
Source§fn default() -> AuthMethod
fn default() -> AuthMethod
Returns the “default value” for a type. Read more
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