pub enum TrailingSlashMode {
Strict,
Redirect,
RedirectWithSlash,
MatchBoth,
}Expand description
Variants§
Strict
Exact match required - /users and /users/ are different routes.
Redirect
Redirect trailing slash to no trailing slash (308 Permanent Redirect).
/users/ redirects to /users.
RedirectWithSlash
Redirect no trailing slash to with trailing slash (308 Permanent Redirect).
/users redirects to /users/.
MatchBoth
Accept both forms without redirect.
Both /users and /users/ match the route.
Trait Implementations§
Source§impl Clone for TrailingSlashMode
impl Clone for TrailingSlashMode
Source§fn clone(&self) -> TrailingSlashMode
fn clone(&self) -> TrailingSlashMode
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 Debug for TrailingSlashMode
impl Debug for TrailingSlashMode
Source§impl Default for TrailingSlashMode
impl Default for TrailingSlashMode
Source§fn default() -> TrailingSlashMode
fn default() -> TrailingSlashMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for TrailingSlashMode
impl PartialEq for TrailingSlashMode
impl Copy for TrailingSlashMode
impl Eq for TrailingSlashMode
impl StructuralPartialEq for TrailingSlashMode
Auto Trait Implementations§
impl Freeze for TrailingSlashMode
impl RefUnwindSafe for TrailingSlashMode
impl Send for TrailingSlashMode
impl Sync for TrailingSlashMode
impl Unpin for TrailingSlashMode
impl UnwindSafe for TrailingSlashMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).