pub struct HttpCredentials {
pub username: String,
pub password: String,
pub origin: Option<String>,
pub send: Option<CredentialSend>,
}Expand description
HTTP authentication credentials.
Fields§
§username: StringUsername for authentication.
password: StringPassword for authentication.
origin: Option<String>Optional origin to send credentials only to specific domain.
send: Option<CredentialSend>Whether to send credentials preemptively.
Implementations§
Source§impl HttpCredentials
impl HttpCredentials
Sourcepub fn new(username: impl Into<String>, password: impl Into<String>) -> Self
pub fn new(username: impl Into<String>, password: impl Into<String>) -> Self
Create new HTTP credentials.
Sourcepub fn origin(self, origin: impl Into<String>) -> Self
pub fn origin(self, origin: impl Into<String>) -> Self
Set the origin to send credentials only to specific domain.
Sourcepub fn send(self, send: CredentialSend) -> Self
pub fn send(self, send: CredentialSend) -> Self
Set when to send credentials.
Trait Implementations§
Source§impl Clone for HttpCredentials
impl Clone for HttpCredentials
Source§fn clone(&self) -> HttpCredentials
fn clone(&self) -> HttpCredentials
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 moreAuto Trait Implementations§
impl Freeze for HttpCredentials
impl RefUnwindSafe for HttpCredentials
impl Send for HttpCredentials
impl Sync for HttpCredentials
impl Unpin for HttpCredentials
impl UnwindSafe for HttpCredentials
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