I'm using Rocket framework and I want to make an async HTTP request in my handler, something like this
#[get("/")]
async fn handler() -> String {
some_func().await;
"OK".into()
}
And as a result, I get the next error
the trait `rocket::response::Responder<'_>` is not implemented for `impl core::future::future::Future`
I tried to write implementation but failed. Is there a way to implement trait for impl Trait?
Or maybe specify the return type of async fn so I can return my custom type with necessary traits implemented?