Skip to main content

GrpcChannel

Trait GrpcChannel 

Source
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§

Source

fn unary( &self, call: &GrpcCallContext, body: &[u8], ) -> Result<GrpcReply, BridgeError>

Source

fn close(&self) -> Result<(), BridgeError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§