quic_rpc::message

Trait Msg

Source
pub trait Msg<S: Service>:
    Into<S::Req>
    + TryFrom<S::Req>
    + Send
    + 'static {
    type Pattern: InteractionPattern;
}
Expand description

Declares the interaction pattern for a message and a service.

For each server and each message, only one interaction pattern can be defined.

Required Associated Types§

Source

type Pattern: InteractionPattern

The interaction pattern for this message with this service.

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§

Source§

impl<T: RpcMsg<S>, S: Service> Msg<S> for T

We can only do this for one trait, so we do it for RpcMsg since it is the most common