dioxus_retrouter/
routecontext.rs

1/// A `RouteContext` is a context that is provided by [`Route`](fn.Route.html) components.
2///
3/// This signals to all child [`Route`] and [`Link`] components that they are
4/// currently nested under this route.
5#[derive(Debug, Clone)]
6pub struct RouteContext {
7    /// The `declared_route` is the sub-piece of the route that matches this pattern.
8    ///
9    ///
10    /// It follows this pattern:
11    /// ```ignore
12    /// "name/:id"
13    /// ```
14    pub declared_route: String,
15
16    /// The `total_route` is the full route that matches this pattern.
17    ///
18    ///
19    /// It follows this pattern:
20    /// ```ignore
21    /// "/level0/level1/:id"
22    /// ```
23    pub total_route: String,
24}