Skip to main content

volter_core/
url_params.rs

1//! [`UrlParams`] — path parameters extracted by the router.
2//!
3//! This type is stored as a request extension by the router and read by the
4//! [`Path`](crate::extract::FromRequestParts) extractor.  It lives in
5//! `volter-core` because both `volter-router` (the writer) and
6//! `volter-extract` (the reader) depend on this crate.
7
8/// Path parameters extracted by the router from a parameterized route.
9///
10/// Each entry is a `(name, value)` pair corresponding to a named segment
11/// in the route pattern (e.g. `:id` → `("id", "42")`).
12///
13/// This type is not intended for direct use by application code — use
14/// the [`Path`](crate::extract::FromRequestParts) extractor instead.
15#[derive(Clone, Debug, Default)]
16pub struct UrlParams(pub Vec<(String, String)>);