Skip to main content

euv_ui/component/router/
struct.rs

1use super::*;
2
3/// A nested route configuration entry.
4///
5/// Routes form a tree: each route can have its own
6/// component (the "layout" or "page") and zero or more
7/// child routes. The path of a child route is resolved
8/// against the parent path during matching.
9#[derive(Clone, CustomDebug, Data)]
10pub struct NestedRouteConfig {
11    /// The route path (e.g. `/settings/profile`).
12    pub path: String,
13    /// The component to render for this route.
14    #[debug(skip)]
15    pub component: Rc<dyn Fn() -> VirtualNode>,
16    /// The child routes, if any.
17    pub children: Vec<NestedRouteConfig>,
18}