Visibility of the Stream adaptor structures in tokio-stream #6655
Answered
by
Darksonn
sharpened-nacho
asked this question in
General
-
The For context, I am playing around with tonic, and need to name the type of the impl MyServiceTrait for MyServiceStructure {
type RpcResponseType = Take<MyStreamType>;
async fn my_fn(&self, request: ...) -> Result<Response<RpcResponseType>, Status> { ... }
} and I can't import |
Beta Was this translation helpful? Give feedback.
Answered by
Darksonn
Jun 25, 2024
Replies: 1 comment 4 replies
-
We usually do this kind of thing so that we can later use |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the type is visible, then you can write code that would not compile if the type stops being
Take<Self>
. Changing it to returnimpl Stream
would count as that.As for whether a change will be made, well, I could probably be convinced to accept a change for this. But I will not make the change myself.