fast-nail-55400
06/28/2022, 8:22 PMfast-nail-55400
06/28/2022, 8:22 PMerror[E0207]: the type parameter `ReqBody` is not constrained by the impl trait, self type, or predicates
--> grpc_util/src/metrics.rs:74:6
|
74 | impl<ReqBody, S> Future for NetworkMetricsFuture<S::Future>
| ^^^^^^^ unconstrained type parameter
error[E0207]: the type parameter `S` is not constrained by the impl trait, self type, or predicates
--> grpc_util/src/metrics.rs:74:15
|
74 | impl<ReqBody, S> Future for NetworkMetricsFuture<S::Future>
| ^ unconstrained type parameter
fast-nail-55400
06/28/2022, 8:23 PMimpl<ReqBody, S> Future for NetworkMetricsFuture<S::Future>
where
S: Service<Request<ReqBody>>,
{
type Output = S::Future;
...
}
fast-nail-55400
06/28/2022, 8:23 PMimpl<ReqBody, S> Service<Request<ReqBody>> for SetRequestHeaders<S>
where
S: Service<Request<ReqBody>>,
{
type Response = S::Response;
type Error = S::Error;
type Future = S::Future;
...
}
fast-nail-55400
06/28/2022, 8:24 PMfast-nail-55400
06/28/2022, 8:25 PMfast-nail-55400
06/28/2022, 8:28 PMwitty-crayon-22786
06/28/2022, 8:44 PMcall
body?witty-crayon-22786
06/28/2022, 8:44 PMlayer_fn
rather than defining a layer: https://docs.rs/tower/latest/tower/layer/fn.layer_fn.htmlwitty-crayon-22786
06/28/2022, 8:44 PMfast-nail-55400
06/28/2022, 8:44 PMrather than defining your own future, you could probably return BoxFuture, and then use combinators in thegood idea, will try that next. I was trying to go with the more efficient solution first.body?call
witty-crayon-22786
06/28/2022, 8:46 PMtower
would be the best sourcewitty-crayon-22786
06/28/2022, 8:48 PMfast-nail-55400
06/28/2022, 8:48 PMPropagateRequestIdResponseFuture
fast-nail-55400
06/28/2022, 8:49 PMfast-nail-55400
06/28/2022, 8:49 PMtype Output = Result<Response<B>, E>;
witty-crayon-22786
06/28/2022, 8:49 PMfast-nail-55400
06/28/2022, 9:02 PMfast-nail-55400
06/28/2022, 9:57 PMwitty-crayon-22786
06/28/2022, 9:57 PM