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
let factory = move |peer:Option<SocketAddr>| {// Request travels from bottom to top,// Response travels from top to bottom.pipe!(Root::new(pool, &config.server),
(Browse::new[&config.browse, root.as_path()]),
(Cors::new[&config.cors]),
(Compress::new[pool, &config.gzip]),
(Log::new[peer, &config.log]),
(Gate::new[]))};
When I rewrote the server, I found it easier to figure out lifetimes when the services manually called another_service.call(req) instead of holding the next service in their struct. But I have a branch that figured it out again.
Also, ideally unused middleware simply wouldn't appear in the chain instead of no-op'ing.
The text was updated successfully, but these errors were encountered:
My previous iteration had a cuter solution: https://github.com/danneu/hunk-prev/blob/master/src/lib.rs#L70-L81
When I rewrote the server, I found it easier to figure out lifetimes when the services manually called
another_service.call(req)
instead of holding the next service in their struct. But I have a branch that figured it out again.Also, ideally unused middleware simply wouldn't appear in the chain instead of no-op'ing.
The text was updated successfully, but these errors were encountered: