pub struct BasicAuth { /* private fields */ }Expand description
HTTP Basic Authentication credentials.
Generates Authorization: Basic base64(username:password) headers.
§Security
The Debug and Display implementations redact the password.
The raw password is never exposed in error messages or logs.
§Policy
- Usernames containing
:are rejected (RFC 7617 ambiguity). - Passwords may be empty.
- Credentials are encoded as UTF-8 bytes.
- CR/LF characters in username or password are rejected.
Implementations§
Source§impl BasicAuth
impl BasicAuth
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BasicAuth
impl RefUnwindSafe for BasicAuth
impl Send for BasicAuth
impl Sync for BasicAuth
impl Unpin for BasicAuth
impl UnsafeUnpin for BasicAuth
impl UnwindSafe for BasicAuth
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