pub struct BasicAuthCredential { /* private fields */ }Expand description
A username/password pair accepted by HTTP Basic authentication.
Implementations§
Source§impl BasicAuthCredential
impl BasicAuthCredential
Sourcepub fn new(username: impl AsRef<str>, password: impl AsRef<str>) -> Self
pub fn new(username: impl AsRef<str>, password: impl AsRef<str>) -> Self
Creates a credential from the exact username and password bytes.
HTTP Basic authentication uses the first colon as the username/password
separator, so usernames should not contain :. Passwords may contain
colons. Serve authenticated endpoints only through HTTPS or trusted TLS
termination because HTTP Basic credentials are not encrypted.
Trait Implementations§
Source§impl Clone for BasicAuthCredential
impl Clone for BasicAuthCredential
Source§fn clone(&self) -> BasicAuthCredential
fn clone(&self) -> BasicAuthCredential
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BasicAuthCredential
impl RefUnwindSafe for BasicAuthCredential
impl Send for BasicAuthCredential
impl Sync for BasicAuthCredential
impl Unpin for BasicAuthCredential
impl UnsafeUnpin for BasicAuthCredential
impl UnwindSafe for BasicAuthCredential
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