Trait fibers_rpc::Call [] [src]

pub trait Call: Sized + Send + Sync + 'static {
    type Req;
    type ReqEncoder: Encode<Message = Self::Req> + Send + 'static;
    type ReqDecoder: Decode<Message = Self::Req> + Send + 'static;
    type Res: Send + 'static;
    type ResEncoder: Encode<Message = Self::Res> + Send + 'static;
    type ResDecoder: Decode<Message = Self::Res> + Send + 'static;

    const ID: ProcedureId;
    const NAME: &'static str;
    fn client(
        service: &ClientServiceHandle
    ) -> CallClient<Self, DefaultDecoderMaker<Self::ResDecoder>, IntoEncoderMaker<Self::ReqEncoder>>
    where
        Self::ReqEncoder: From<Self::Req>,
        Self::ResDecoder: Default
, { ... }
fn client_with_decoder<D>(
        service: &ClientServiceHandle,
        decoder_maker: D
    ) -> CallClient<Self, D, IntoEncoderMaker<Self::ReqEncoder>>
    where
        Self::ReqEncoder: From<Self::Req>,
        D: MakeDecoder<Self::ResDecoder>
, { ... }
fn client_with_encoder<E>(
        service: &ClientServiceHandle,
        encoder_maker: E
    ) -> CallClient<Self, DefaultDecoderMaker<Self::ResDecoder>, E>
    where
        Self::ResDecoder: Default,
        E: MakeEncoder<Self::ReqEncoder>
, { ... }
fn client_with_codec<D, E>(
        service: &ClientServiceHandle,
        decoder_maker: D,
        encoder_maker: E
    ) -> CallClient<Self, D, E>
    where
        D: MakeDecoder<Self::ResDecoder>,
        E: MakeEncoder<Self::ReqEncoder>
, { ... } }

Request/response RPC.

Associated Types

Request message.

Request message encoder.

Request message decoder.

Response message.

Response message encoder.

Response message decoder.

Associated Constants

The identifier of the procedure.

The name of the procedure.

This is only used for debugging purpose.

Provided Methods

Makes a new RPC client.

Makes a new RPC client with the given decoder maker.

Makes a new RPC client with the given encoder maker.

Makes a new RPC client with the given decoder and encoder makers.

Implementors