aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-08 05:23:11 +0000
committerFuwn <[email protected]>2025-07-08 05:23:11 +0000
commit74ce57c0d311089598ad2cc4b7bd452d4e2efad7 (patch)
tree74555398ea1284fb415aaafa7f75f3dad3f8aa50 /src
parentrefactor(RouterOption): Rename trailing slash trimming option (diff)
downloadwindmark-74ce57c0d311089598ad2cc4b7bd452d4e2efad7.tar.xz
windmark-74ce57c0d311089598ad2cc4b7bd452d4e2efad7.zip
docs(router_option): Expand documentation
Diffstat (limited to 'src')
-rw-r--r--src/router_option.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/router_option.rs b/src/router_option.rs
index d3d0bb9..62ecb47 100644
--- a/src/router_option.rs
+++ b/src/router_option.rs
@@ -1,10 +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 if it is present and a route
- /// match exists
+ /// If enabled, removes a trailing slash from the request URL path if a route
+ /// exists for the path without the slash (e.g., `/foo/` becomes `/foo`).
RemoveExtraTrailingSlash,
- /// Add a trailing slash to the URL path if it is missing and a route
- /// match exists
+ /// If enabled, adds a trailing slash to the request URL path if a route
+ /// exists for the path with the slash (e.g., `/foo` becomes `/foo/`).
AddMissingTrailingSlash,
}