pub trait GrpcChannel: Send + Sync {
// Required methods
fn unary(
&self,
call: &GrpcCallContext,
body: &[u8],
) -> Result<GrpcReply, BridgeError>;
fn close(&self) -> Result<(), BridgeError>;
}Expand description
Caller-supplied gRPC channel adapter. The bridge issues unary or server-streaming calls through this trait and is otherwise unaware of the concrete gRPC stack.
Required Methods§
fn unary( &self, call: &GrpcCallContext, body: &[u8], ) -> Result<GrpcReply, BridgeError>
fn close(&self) -> Result<(), BridgeError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".