pub struct DigestCredentials { /* private fields */ }Expand description
A HashMap wrapper that holds credentials mapped to their respective realm
Default credentials can be set to attempt authentication for unknown realms
Implementations§
Source§impl DigestCredentials
impl DigestCredentials
pub fn new() -> Self
Sourcepub fn set_default(&mut self, credentials: DigestUser)
pub fn set_default(&mut self, credentials: DigestUser)
Set default credentials to authenticate on unknown realms
Sourcepub fn add_for_realm<R>(&mut self, realm: R, credentials: DigestUser)
pub fn add_for_realm<R>(&mut self, realm: R, credentials: DigestUser)
Add credentials that will be used when authenticating for realm
Sourcepub fn get_for_realm(&self, realm: &str) -> Option<&DigestUser>
pub fn get_for_realm(&self, realm: &str) -> Option<&DigestUser>
Get credentials for the specified realm
Returns the default credentials when no credentials where set for the
requested realm
Sourcepub fn remove_for_realm(&mut self, realm: &str)
pub fn remove_for_realm(&mut self, realm: &str)
Remove credentials for the specified realm
Trait Implementations§
Source§impl Clone for DigestCredentials
impl Clone for DigestCredentials
Source§fn clone(&self) -> DigestCredentials
fn clone(&self) -> DigestCredentials
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 moreSource§impl Default for DigestCredentials
impl Default for DigestCredentials
Source§fn default() -> DigestCredentials
fn default() -> DigestCredentials
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DigestCredentials
impl RefUnwindSafe for DigestCredentials
impl Send for DigestCredentials
impl Sync for DigestCredentials
impl Unpin for DigestCredentials
impl UnwindSafe for DigestCredentials
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