[][src]Trait libp2p_rpc::RPCProtocol

pub trait RPCProtocol: UpgradeInfo {
    type Request: RPCRequest + Clone;
    type Response: Clone;
    type InboundCodec: Encoder<Item = Self::Response> + Decoder<Item = Self::Request>;
    type OutboundCodec: Encoder<Item = Self::Request> + Decoder<Item = Self::Response>;
    fn inbound_codec(&self, protocol: Self::Info) -> Self::InboundCodec;
fn outbound_codec(&self, protocol: Self::Info) -> Self::OutboundCodec; }

Associated Types

type Request: RPCRequest + Clone

type Response: Clone

type InboundCodec: Encoder<Item = Self::Response> + Decoder<Item = Self::Request>

type OutboundCodec: Encoder<Item = Self::Request> + Decoder<Item = Self::Response>

Loading content...

Required methods

fn inbound_codec(&self, protocol: Self::Info) -> Self::InboundCodec

fn outbound_codec(&self, protocol: Self::Info) -> Self::OutboundCodec

Loading content...

Implementors

Loading content...