pub struct CustomHeaderAuth {
pub headers: HashMap<String, String>,
}Expand description
Custom header authentication
Fields§
§headers: HashMap<String, String>Implementations§
Source§impl CustomHeaderAuth
impl CustomHeaderAuth
pub fn new() -> CustomHeaderAuth
pub fn with_header(self, key: String, value: String) -> CustomHeaderAuth
pub fn with_api_key(self, api_key: String) -> CustomHeaderAuth
pub fn with_bearer_token(self, token: String) -> CustomHeaderAuth
pub fn with_basic_auth(self, username: &str, password: &str) -> CustomHeaderAuth
pub fn get_headers(&self) -> &HashMap<String, String>
pub fn get_header(&self, key: &str) -> Option<&String>
Trait Implementations§
Source§impl Clone for CustomHeaderAuth
impl Clone for CustomHeaderAuth
Source§fn clone(&self) -> CustomHeaderAuth
fn clone(&self) -> CustomHeaderAuth
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 CustomHeaderAuth
impl Debug for CustomHeaderAuth
Source§impl Default for CustomHeaderAuth
impl Default for CustomHeaderAuth
Source§fn default() -> CustomHeaderAuth
fn default() -> CustomHeaderAuth
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CustomHeaderAuth
impl RefUnwindSafe for CustomHeaderAuth
impl Send for CustomHeaderAuth
impl Sync for CustomHeaderAuth
impl Unpin for CustomHeaderAuth
impl UnwindSafe for CustomHeaderAuth
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