Struct tower_http::normalize_path::NormalizePathLayer
source · pub struct NormalizePathLayer {}
Available on crate feature
normalize-path
only.Expand description
Layer that applies NormalizePath
which normalizes paths.
See the module docs for more details.
Implementations§
source§impl NormalizePathLayer
impl NormalizePathLayer
sourcepub fn trim_trailing_slash() -> Self
pub fn trim_trailing_slash() -> Self
Create a new NormalizePathLayer
.
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.
Trait Implementations§
source§impl Clone for NormalizePathLayer
impl Clone for NormalizePathLayer
source§fn clone(&self) -> NormalizePathLayer
fn clone(&self) -> NormalizePathLayer
Returns a copy 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 Debug for NormalizePathLayer
impl Debug for NormalizePathLayer
source§impl<S> Layer<S> for NormalizePathLayer
impl<S> Layer<S> for NormalizePathLayer
impl Copy for NormalizePathLayer
Auto Trait Implementations§
impl RefUnwindSafe for NormalizePathLayer
impl Send for NormalizePathLayer
impl Sync for NormalizePathLayer
impl Unpin for NormalizePathLayer
impl UnwindSafe for NormalizePathLayer
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