cargo-reef 0.2.3

CLI scaffolder + tooling for Reef apps. `cargo reef new my-app` to scaffold; `cargo reef dev` to run; `cargo reef migrate` for DB migrations.
//! Route enum — the typed surface for navigation.
//!
//! Each variant corresponds to a URL pattern AND a component function with
//! the same name. The `Router::<Route> {}` mounted in `launch_root()` (in
//! `src/main.rs`) resolves the current URL to a variant and renders the
//! matching component, wrapped in any `#[layout(...)]` declared here.
//!
//! ## Today (v0.1): hand-written
//!
//! For v0.1, you maintain this enum by hand. When you add a page:
//!
//! 1. Add a variant here with `#[route("/your-path")]`. Use `{}` even for
//!    parameter-less routes (struct-variant syntax is required by `Routable`).
//! 2. Define the component function with the same name as the variant:
//!    - For `/` → `src/app/mod.rs::Home`
//!    - For `/users` → `src/app/users/mod.rs::Users`
//!    - For `/users/show` → `src/app/users/show/mod.rs::UsersShow`
//!    - The function signature must take any dynamic-segment params as args.
//! 3. Import the component below so the macro can resolve the variant.
//!
//! ## v0.5: auto-generated from filesystem
//!
//! In v0.5 of Reef, this file will be auto-generated by `build.rs` from the
//! contents of `src/app/`. You'll never edit it by hand — adding a file at
//! `src/app/users/_id/mod.rs` will automatically produce the corresponding
//! `#[route("/users/:id")]` variant.
//!
//! See `build.rs` at the project root for the planned conventions.
//!
//! ## Dynamic segments (Dioxus syntax)
//!
//! - `:id` — path param, must match a struct field on the variant: `User { id: u64 }`
//! - `?:query&:sort` — query params
//! - `:..segments` — catch-all into `Vec<String>`
//!
//! ## Sub-layouts
//!
//! `#[layout(SubLayout)]` wraps a group of variants in another layout
//! component (which must contain `Outlet::<Route> {}`). The Routable derive
//! processes layouts in attribute order — outer first, inner last.

use dioxus::prelude::*;

// Components referenced by the Routable derive must be in scope.
pub use crate::app::Home;
pub use crate::app::layout::RootLayout;

#[derive(Routable, Clone, PartialEq)]
#[rustfmt::skip]
pub enum Route {
    #[layout(RootLayout)]
        #[route("/")]
        Home {},
}