pub struct RouteTree {
pub routes: Vec<RouteInfo>,
pub fallback: Option<RouteInfo>,
}Expand description
Scanned route tree containing all discovered routes and layout hierarchy.
Fields§
§routes: Vec<RouteInfo>Discovered routes sorted by resolution priority.
fallback: Option<RouteInfo>Fallback route (fallback.fui), if present.
Implementations§
Source§impl RouteTree
impl RouteTree
Sourcepub fn scan(routes_dir: &Path) -> Result<Self>
pub fn scan(routes_dir: &Path) -> Result<Self>
Scan the routes directory (typically src/ui/routes/ or <ui_dir>/routes)
and build a validated RouteTree.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Perform compile-time validations on the discovered routes:
- Duplicated route patterns
- Duplicated enum variant names
- Duplicate parameter names in a single route
Sourcepub fn sort_by_priority(&mut self)
pub fn sort_by_priority(&mut self)
Sort routes by priority: static routes first, then dynamic routes.
Trait Implementations§
impl Eq for RouteTree
impl StructuralPartialEq for RouteTree
Auto Trait Implementations§
impl Freeze for RouteTree
impl RefUnwindSafe for RouteTree
impl Send for RouteTree
impl Sync for RouteTree
impl Unpin for RouteTree
impl UnsafeUnpin for RouteTree
impl UnwindSafe for RouteTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.