Enum actix_web::middleware::normalize::TrailingSlash [−][src]
#[non_exhaustive]
pub enum TrailingSlash {
Always,
MergeOnly,
Trim,
}
Expand description
To be used when constructing NormalizePath
to define it’s behavior.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Always
Always add a trailing slash to the end of the path. This will require all routes to end in a trailing slash for them to be accessible.
MergeOnly
Only merge any present multiple trailing slashes.
Note: This option provides the best compatibility with the v2 version of this middlware.
Trim
Trim trailing slashes from the end of the path.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TrailingSlash
impl Send for TrailingSlash
impl Sync for TrailingSlash
impl Unpin for TrailingSlash
impl UnwindSafe for TrailingSlash
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more