Skip to main content

Module routing

Module routing 

Source
Expand description

Pure-Rust URL-routing helpers (M-TRAY.4 / AUT-253, M-BUBBLE.0 / AUT-273).

The browser-facing entry points in crate pull the query string off window.location.search() and hand it to parse_surface (for the in-AppShell surface) or parse_mount_point (for the window-level mount dispatch — AppShell vs Bubble vs DropZone). Splitting the parse out of the wasm-only path makes it testable on every OS (no web_sys, no Tauri runtime).

Enums§

MountPoint
Which Leptos tree the current page mounts — drives the top-level dispatch in crate::run.

Functions§

parse_mount_point
Parse a URL query string (with or without the leading ?) into a MountPoint. ?surface=… wins over ?mount=… so the AppShell surface query takes precedence — matters only if both ever appear in the same URL, which they shouldn’t.
parse_slug
Map a slug to its AppSection. Accepts both recorder and record for the Record variant (the storybook uses record in the kebab-case slug; the URL convention is the longer recorder).
parse_surface
Parse a URL query string (with or without the leading ?) for a surface=<slug> parameter. Returns the matching AppSection or None if the param is missing / unrecognised.
surface_slug
Convert an AppSection to its canonical URL slug. Round-trips with parse_slug / parse_surface.