axum/examples
David Pedersen 04d62798b6
Reduce body boxing (#9)
Previously, when routing between one or two requests the two body types
would be merged by boxing them. This isn't ideal since it introduces a
layer indirection for each route.

We can't require the services to be routed between as not all services
use the same body type.

This changes that so it instead uses an `Either` enum that implements
`http_body::Body` if each variant does. Will reduce the overall
allocations and hopefully the compiler can optimize things if both
variants are the same.
2021-06-12 23:59:18 +02:00
..
websocket Add support for websockets (#3) 2021-06-12 20:50:30 +02:00
hello_world.rs Add RoutingDsl::{serve, into_make_service} (#8) 2021-06-12 21:44:40 +02:00
key_value_store.rs Reduce body boxing (#9) 2021-06-12 23:59:18 +02:00
static_file_server.rs Add RoutingDsl::{serve, into_make_service} (#8) 2021-06-12 21:44:40 +02:00
websocket.rs Add RoutingDsl::{serve, into_make_service} (#8) 2021-06-12 21:44:40 +02:00