-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Don't use private traits in public APIs #2051
Copy link
Copy link
Closed
Labels
B-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.
Description
For example, hyper master currently has this:
impl<I, B, S, E> Future for Connection<I, S, E>
where
S: HttpService<Body, ResBody=B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
I: AsyncRead + AsyncWrite + Unpin + 'static,
B: Payload + 'static,
B::Data: Unpin,
E: H2Exec<S::Future, B>,HttpService and H2Exec are both private traits, though. This makes it a huge pain for code working generically with connections to express the proper bounds in their code. You basically have to try to reverse engineer the impl bounds by bouncing off the compiler :(
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
B-rfcBlocked: More comments would be useful in determine next steps.Blocked: More comments would be useful in determine next steps.