pub enum ApiAuth {
EmailAndKey(String, String),
Token(String),
}Expand description
Authentication methods
// example 1:
// use email and password
// 'EMAIL' will be set to header 'x-auth-email'
// 'KEY' will be set to header 'x-auth-key'
ApiAuth::EmailAndKey("<EMAIL>".to_string(), "<KEY>".to_string())// example 2:
ApiAuth::Token("<TOKEN>".to_string())// example 3:
// read <CLOUDFLARE_TOKEN> from environment variable
ApiAuth::default()Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ApiAuth
impl RefUnwindSafe for ApiAuth
impl Send for ApiAuth
impl Sync for ApiAuth
impl Unpin for ApiAuth
impl UnsafeUnpin for ApiAuth
impl UnwindSafe for ApiAuth
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