You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to add a feature such that templates to return string instead of function if the feature flag is enabled This makes it easy to onboard to new frameworks. More info at salvo-rs/salvo#147 (comment).
// currentletmut buf = Vec::new();
templates::hello(&mut buf,"world");
response.render(buf);// new
response.render(templates::hello_world_str("world"));
This is done in the warp03 feature. I'm not familiar with the salvo crate, but it seems that it is using hyper, so maybe warp should have a feature providing that extension crate for http::Response ? But in that case, it would seem more natural for me to provide it for hyper::response::Builder, but it seems that salvo uses a &mut Response rather than letting the handler use a builder. Maybe the extension trait can be provided both for http::request::Builder and http::Request.
Is it possible to add a feature such that templates to return string instead of function if the feature flag is enabled This makes it easy to onboard to new frameworks. More info at salvo-rs/salvo#147 (comment).
//cc @chrislearn
The text was updated successfully, but these errors were encountered: