📅  最后修改于: 2022-03-11 14:55:57.105000             🧑  作者: Mango
#[derive(Serialize)]
struct Measurement {
temperature: f32,
}
async fn hello_world() -> impl Responder {
"Hello World!"
}
async fn current_temperature() -> impl Responder {
web::Json(Measurement { temperature: 42.3 })
}