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
I think it's related to tokio-rs/prost/issues/429, currently Rust protobuf generator doesn't allow you to choose the pointer, in which case you're not allowed to use Arc for reusing value. I hope it can be implemented soon.
http::Request is not clonable due to the Extensions type it uses. You can though construct your proto to use bytes and then use the bytes feature in prost to have the bytes field be Bytes. This then would allow you to cheaply clone the bytes and avoid heavy clones.
Feature Request
Crates
tonic
Motivation
tonic seems slow in use-cases where many similar requests need to be sent.
Proposal
Re-use of the tonic::Request instance, just setting the payload new -- or even just overwriting some fields of the payload.
Very simple example:
Current situation: "trait Copy not implemented for struct Request" -- "value moved in previous iteration".
Alternatives
Not sure.
The text was updated successfully, but these errors were encountered: