Transport

Trait Transport 

Source
pub trait Transport:
    Framing
    + Send
    + Sync
    + Sized
    + 'static {
    type RpcOptions: Default;

    // Required method
    fn call(
        &self,
        service_name: &'static CStr,
        fn_name: &'static CStr,
        req: FramingEncodedFinal<Self>,
        rpc_options: Self::RpcOptions,
    ) -> BoxFuture<'static, Result<FramingDecoded<Self>>>;

    // Provided methods
    fn call_stream(
        &self,
        _service_name: &'static CStr,
        _fn_name: &'static CStr,
        _req: FramingEncodedFinal<Self>,
        _rpc_options: Self::RpcOptions,
    ) -> BoxFuture<'static, Result<(FramingDecoded<Self>, BoxStream<'static, Result<ClientStreamElement<FramingDecoded<Self>>>>)>> { ... }
    fn create_interaction(
        &self,
        _method_name: &'static CStr,
    ) -> Result<Self, Error> { ... }
}

Required Associated Types§

Required Methods§

Source

fn call( &self, service_name: &'static CStr, fn_name: &'static CStr, req: FramingEncodedFinal<Self>, rpc_options: Self::RpcOptions, ) -> BoxFuture<'static, Result<FramingDecoded<Self>>>

Provided Methods§

Source

fn call_stream( &self, _service_name: &'static CStr, _fn_name: &'static CStr, _req: FramingEncodedFinal<Self>, _rpc_options: Self::RpcOptions, ) -> BoxFuture<'static, Result<(FramingDecoded<Self>, BoxStream<'static, Result<ClientStreamElement<FramingDecoded<Self>>>>)>>

Source

fn create_interaction(&self, _method_name: &'static CStr) -> Result<Self, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§