feat(body): add body::aggregate and body::to_bytes functions
Adds utility functions to `hyper::body` to help asynchronously collecting all the buffers of some `HttpBody` into one. - `aggregate` will collect all into an `impl Buf` without copying the contents. This is ideal if you don't need a contiguous buffer. - `to_bytes` will copy all the data into a single contiguous `Bytes` buffer.
This commit is contained in:
@@ -98,7 +98,7 @@ required-features = ["runtime"]
|
||||
[[example]]
|
||||
name = "client_json"
|
||||
path = "examples/client_json.rs"
|
||||
required-features = ["runtime", "stream"]
|
||||
required-features = ["runtime"]
|
||||
|
||||
[[example]]
|
||||
name = "echo"
|
||||
@@ -162,6 +162,11 @@ path = "examples/web_api.rs"
|
||||
required-features = ["runtime", "stream"]
|
||||
|
||||
|
||||
[[bench]]
|
||||
name = "body"
|
||||
path = "benches/body.rs"
|
||||
required-features = ["runtime", "stream"]
|
||||
|
||||
[[bench]]
|
||||
name = "connect"
|
||||
path = "benches/connect.rs"
|
||||
|
||||
Reference in New Issue
Block a user