aboutsummaryrefslogtreecommitdiff
path: root/src/router_option.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-08 05:15:47 +0000
committerFuwn <[email protected]>2025-07-08 05:15:47 +0000
commit21d3b1dce69282496b9474e745a3e4b1730ac468 (patch)
treef047076b73899f793cd92a2a56830f1a790b0013 /src/router_option.rs
parentrefactor(router): Smarter trailing slash clipper (diff)
downloadwindmark-21d3b1dce69282496b9474e745a3e4b1730ac468.tar.xz
windmark-21d3b1dce69282496b9474e745a3e4b1730ac468.zip
feat(router): Add missing trailing slash corrector
Diffstat (limited to 'src/router_option.rs')
-rw-r--r--src/router_option.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/router_option.rs b/src/router_option.rs
index c99f3ab..2672a42 100644
--- a/src/router_option.rs
+++ b/src/router_option.rs
@@ -1,6 +1,10 @@
/// Options that can be set for the `Router`
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
pub enum RouterOption {
- /// Trim trailing slashes from the URL path
+ /// Trim trailing slashes from the URL path if it is present and a route
+ /// match exists
TrimTrailingSlashes,
+ /// Add a trailing slash to the URL path if it is missing and a route
+ /// match exists
+ AddMissingTrailingSlash,
}