diff --git a/grpc/src/credentials/dyn_wrapper.rs b/grpc/src/credentials/dyn_wrapper.rs index 09543d1c5..31da5c852 100644 --- a/grpc/src/credentials/dyn_wrapper.rs +++ b/grpc/src/credentials/dyn_wrapper.rs @@ -95,7 +95,7 @@ where } } -impl ChannelCredentials for Arc { +impl ChannelCredentials for dyn DynChannelCredentials { type ContextType = Box; type Output = BoxEndpoint; @@ -107,13 +107,38 @@ impl ChannelCredentials for Arc { runtime: &GrpcRuntime, _token: private::Internal, ) -> Result, Self::ContextType>, String> { - (**self) - .dyn_connect(authority, Box::new(source), info, runtime) + self.dyn_connect(authority, Box::new(source), info, runtime) .await } fn get_call_credentials(&self, _: private::Internal) -> Option<&Arc> { - (**self).get_call_credentials() + self.get_call_credentials() + } + + fn info(&self) -> &ProtocolInfo { + self.info() + } +} + +impl ChannelCredentials for Arc { + type ContextType = T::ContextType; + type Output = T::Output; + + async fn connect( + &self, + authority: &Authority, + source: Input, + info: &ClientHandshakeInfo, + runtime: &GrpcRuntime, + token: private::Internal, + ) -> Result, Self::ContextType>, String> { + (**self) + .connect(authority, source, info, runtime, token) + .await + } + + fn get_call_credentials(&self, token: private::Internal) -> Option<&Arc> { + (**self).get_call_credentials(token) } fn info(&self) -> &ProtocolInfo {