Unify integration API
Kijewski opened this issue · comments
René Kijewski commented
There is
fn askama_warp::reply(&impl Template) -> Response
fn askama_tide::try_into_body(&impl Template) -> Result<Body>
fn askama_tide::into_response(&impl Template) -> Response
fn askama_rocket::respond(&impl Template) -> Result<_>
fn askama_axum::into_response(&impl Template) -> Response
<T as TemplateToResponse>::to_response(&self) -> Response
Shouldn't we use the moment, if we upload new versions of the integration crates anyway, to unify the APIs amongst the crates?
I like the API of askama_tide
the best: One function try_into_response(&impl Template)
to generate a Result<_>
, and one function into_response(&impl Template)
to generate a response that might be an error page.
Dirkjan Ochtman commented
Sounds good to me!