quic_rpc::pattern::bidi_streaming

Trait BidiStreamingMsg

Source
pub trait BidiStreamingMsg<S: Service>: Msg<S, Pattern = BidiStreaming> {
    type Update: Into<S::Req> + TryFrom<S::Req> + Send + 'static;
    type Response: Into<S::Res> + TryFrom<S::Res> + Send + 'static;
}
Expand description

Defines update type and response type for a bidi streaming message.

Required Associated Types§

Source

type Update: Into<S::Req> + TryFrom<S::Req> + Send + 'static

The type for request updates

For a request that does not support updates, this can be safely set to any type, including the message type itself. Any update for such a request will result in an error.

Source

type Response: Into<S::Res> + TryFrom<S::Res> + Send + 'static

The type for the response

For requests that can produce errors, this can be set to Result<T, E>.

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§