Closed lo-ferris closed 4 months ago
This type purposefully does not expose a public constructor.
The recommendation if you feel you need to construct one is to change your function to accept a generic body, and then you can pass some other type with a public constructor.
Great, thank you.
hello, i understand the need to keep the type opaque. I just wanted to give you an example where having a way to construct Incoming
would be helpful.
i'm using Client<..., Incoming>
to forward incoming requests (essentially, my program is the gateway example
.) in addition, i'd also like to send new requests over that same client (to utilize the underlying connection pooling), but can't since i'm not able to construct requests matching the type Request<Incoming>
.
https://github.com/hyperium/hyper/blob/master/src/body/incoming.rs
// This is the source code
// Change to