hyperium / tonic

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

feat: Move Request server util method to RequestExt #1772

Open tottoto opened 3 months ago

tottoto commented 3 months ago

Motivation

These utility functionalities seem to be more practical APIs than the other basic ones. Moving them to an extension trait can keep the request implementation more basic. The drawback is that users need to import the trait to use these functionalities.

Solution

Adds an extension trait for request and moves these functionalities to the trait.

djc commented 3 months ago

This doesn't seem like an improvement to me.