#[get]
GET route handler macro
#[rustapi::get("/users")] async fn list_users() -> Json<Vec<User>> { Json(vec![]) } #[rustapi::get("/users/{id}")] async fn get_user(Path(id): Path<i64>) -> Result<User> { Ok(User { id, name: "John".into() }) }