pub struct BasicAuth { /* private fields */ }Implementations§
Source§impl BasicAuth
impl BasicAuth
Sourcepub fn single(user: impl Into<String>, pass: impl Into<String>) -> Self
pub fn single(user: impl Into<String>, pass: impl Into<String>) -> Self
Creates authentication middleware with a single static user credential.
Sourcepub fn multiple<I, T, P>(pairs: I) -> Self
pub fn multiple<I, T, P>(pairs: I) -> Self
Creates authentication middleware with multiple static user credentials.
Sourcepub fn with_verify<F>(cb: F) -> Self
pub fn with_verify<F>(cb: F) -> Self
Creates authentication middleware with a custom verification function.
Sourcepub fn users_with_verify<I, S, F>(pairs: I, cb: F) -> Self
pub fn users_with_verify<I, S, F>(pairs: I, cb: F) -> Self
Creates authentication middleware with both static credentials and custom verification.
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