pachy_core/lib.rs
1pub mod component;
2pub mod error;
3pub mod props;
4
5pub use component::{Component, RenderContext, RenderedNode};
6pub use error::PachyError;
7pub use props::Props;
8
9pub type Result<T> = std::result::Result<T, PachyError>;
10
11/// Compile-time route registration entry emitted by `#[page]`.
12pub struct PageRegistration {
13 /// The Rust module path of the page, e.g. `"my_app::routes::about::page"`.
14 /// Used at startup to derive the HTTP route path.
15 pub module_path: &'static str,
16 /// Factory that constructs a boxed `Component` instance.
17 pub factory: fn() -> Box<dyn Component>,
18}
19
20inventory::collect!(PageRegistration);