Trait fibers_rpc::Cast
[−]
[src]
pub trait Cast: Sized + Sync + Send + 'static { type Notification; type Encoder: Encode<Message = Self::Notification> + Send + 'static; type Decoder: Decode<Message = Self::Notification> + Send + 'static; const ID: ProcedureId; const NAME: &'static str; fn client(
service: &ClientServiceHandle
) -> CastClient<Self, IntoEncoderMaker<Self::Encoder>>
where
Self::Encoder: From<Self::Notification>, { ... } fn client_with_encoder<E>(
service: &ClientServiceHandle,
encoder_maker: E
) -> CastClient<Self, E>
where
E: MakeEncoder<Self::Encoder>, { ... } }
Notification RPC.
Associated Types
type Notification
Notification message.
type Encoder: Encode<Message = Self::Notification> + Send + 'static
Notification message encoder.
type Decoder: Decode<Message = Self::Notification> + Send + 'static
Notification message decoder.
Associated Constants
const ID: ProcedureId
The identifier of the procedure.
const NAME: &'static str
The name of the procedure.
This is only used for debugging purpose.
Provided Methods
fn client(
service: &ClientServiceHandle
) -> CastClient<Self, IntoEncoderMaker<Self::Encoder>> where
Self::Encoder: From<Self::Notification>,
service: &ClientServiceHandle
) -> CastClient<Self, IntoEncoderMaker<Self::Encoder>> where
Self::Encoder: From<Self::Notification>,
Makes a new RPC client.
fn client_with_encoder<E>(
service: &ClientServiceHandle,
encoder_maker: E
) -> CastClient<Self, E> where
E: MakeEncoder<Self::Encoder>,
service: &ClientServiceHandle,
encoder_maker: E
) -> CastClient<Self, E> where
E: MakeEncoder<Self::Encoder>,
Makes a new RPC client with the given encoder maker.