#[non_exhaustive]pub enum Auth {
Basic {
user: String,
password: String,
},
Bearer(String),
Digest {
user: String,
password: String,
},
Negotiate,
Ntlm {
user: String,
password: String,
},
}Expand description
HTTP authentication, see Request::auth. Credentials are handed to
libcurl, which answers the server’s challenge; only Basic and Bearer
are sent without being asked.
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
Bearer(String)
Authorization: Bearer <token>, unless the request sets that header.
Digest
Negotiate
Kerberos (SPNEGO) with the credentials of the process, like
curl --negotiate -u :. A system libcurl has it; a static one
needs the curl crate’s spnego feature and the GSS-API headers.
Ntlm
NTLM. A static libcurl needs the curl crate’s ntlm feature.
Trait Implementations§
impl Eq for Auth
impl StructuralPartialEq for Auth
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl UnwindSafe for Auth
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