pub struct NormalizePath<S> { /* private fields */ }Expand description
Middleware that normalizes paths.
See the module docs for more details.
Implementations§
Source§impl<S> NormalizePath<S>
impl<S> NormalizePath<S>
Sourcepub fn trim_trailing_slash<P: AsRef<str>>(inner: S, exceptions: &[P]) -> Self
pub fn trim_trailing_slash<P: AsRef<str>>(inner: S, exceptions: &[P]) -> Self
Create a new NormalizePath.
Any trailing slashes from request paths will be removed. For example, a request with /foo/
will be changed to /foo before reaching the inner service.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes self, returning the underlying service.
Trait Implementations§
Source§impl<S: Clone> Clone for NormalizePath<S>
impl<S: Clone> Clone for NormalizePath<S>
Source§fn clone(&self) -> NormalizePath<S>
fn clone(&self) -> NormalizePath<S>
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<S: Debug> Debug for NormalizePath<S>
impl<S: Debug> Debug for NormalizePath<S>
Auto Trait Implementations§
impl<S> Freeze for NormalizePath<S>where
S: Freeze,
impl<S> RefUnwindSafe for NormalizePath<S>where
S: RefUnwindSafe,
impl<S> Send for NormalizePath<S>where
S: Send,
impl<S> Sync for NormalizePath<S>where
S: Sync,
impl<S> Unpin for NormalizePath<S>where
S: Unpin,
impl<S> UnwindSafe for NormalizePath<S>where
S: UnwindSafe,
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