Trait grafana_plugin_sdk::backend::IntoHttpResponse
source · pub trait IntoHttpResponse {
// Required method
fn into_http_response<'async_trait>(
self
) -> Pin<Box<dyn Future<Output = Result<Response<Bytes>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait;
}
Expand description
Trait indicating that a type can be fallibly converted into a http::Response<Bytes>
.
This is a separate trait (rather than using TryFrom
/TryInto
) because it may
need to be async.