If it could do the Error case too that would be cool.
For Rocket, I have something like:
#[get("/list/<status>")]
fn list_prospects(api_key: ApiKey, status: String) -> Result<Json<PendingList>, Status>
with a impl<'a, 'r> FromRequest<'a, 'r> for ApiKey
But I couldn't quickly get an `async` piece in there so I just sucked it up and synced it all up since it's only backing a Retool dashboard so it isn't the end of the world.So if the example is like:
#[get('/todo')]
fn get_todos() -> Result<Json<TodoList>, Status>
let todos = reqwest...
Ok(todos)
or the equivalent in the web framework you have that would be hecka useful.