pub struct BasicAuthLayer { /* private fields */ }Expand description
Basic Authentication Layer
A Tower layer that adds HTTP Basic Authentication to routes.
Implementations§
Source§impl BasicAuthLayer
impl BasicAuthLayer
Sourcepub fn from_config(config: BasicAuthConfig) -> Self
pub fn from_config(config: BasicAuthConfig) -> Self
Create from an existing configuration
Sourcepub fn exclude_paths(
self,
paths: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn exclude_paths( self, paths: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Exclude multiple paths from authentication
Trait Implementations§
Source§impl Clone for BasicAuthLayer
impl Clone for BasicAuthLayer
Source§fn clone(&self) -> BasicAuthLayer
fn clone(&self) -> BasicAuthLayer
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 BasicAuthLayer
impl RefUnwindSafe for BasicAuthLayer
impl Send for BasicAuthLayer
impl Sync for BasicAuthLayer
impl Unpin for BasicAuthLayer
impl UnwindSafe for BasicAuthLayer
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