1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! API layer — the wire surface. Both server fns (one-shot RPC) and WS
//! endpoints live here.
//!
//! ## The macros
//!
//! - `#[get]`, `#[post]`, `#[put]`, `#[delete]`, `#[patch]` — explicit HTTP
//! method + URL path. The idiomatic Dioxus 0.7 way.
//! - `#[server]` — generic fallback when you don't care about method/URL.
//!
//! Path parameters in `{name}` braces get extracted into matching function
//! arguments by name. Query params follow `?name1&name2` syntax.
//!
//! ## Why explicit URLs
//!
//! The macro generates BOTH halves from one source:
//! - WASM: a typed client stub the UI calls like a normal async fn
//! - Native: an HTTP handler registered at the declared path
//!
//! Both halves see the same path, the same param types, and the same return
//! type. Refactor-safe end-to-end.
//!
//! ## Where the body runs
//!
//! Function bodies run **server-side only**. Bodies can `use crate::server::*`
//! to delegate to DB and business logic. The macro auto-elides bodies on
//! WASM builds — your client never sees server-only code.
use *;
use crateStatus;
pub async