// api/ — Leptos server functions (the bridge between client and server) // // Server functions are annotated with `#[server]`. // Leptos compiles them differently depending on the active feature: // // ssr → the function body runs on the server (normal async Rust code) // hydrate → the body is replaced by an HTTP POST call to /api/ // // This means: // - Function signatures (arguments + return types) must compile for BOTH targets. // All types used here must also be in `models.rs` (shared code). // - Imports inside the function body are only compiled for `ssr`, // so ssr-only modules (server::repository, sqlx) can be used freely there. // - The pool is retrieved via `use_context::()` — it is injected // into the Leptos context by `main.rs` for every request. pub mod applications; pub mod hosts; pub mod networks; pub mod summary;