hyperium / tonic

A native gRPC client & server implementation with async/await support.
https://docs.rs/tonic
MIT License
9.35k stars 957 forks source link

feat: Implement http_body::Body::size_hint for custom body #1713

Closed tottoto closed 1 month ago

tottoto commented 1 month ago

Motivation

Provides the Body stream's size hint.

Solution

Implements Body::size_hint for custom body types. It is intentional that this is not added to test code.

djc commented 1 month ago

Nice, thanks!