pub trait GenericStreamRequest:
    Encode
    + Decode
    + Debug
    + Send
    + Sync
    + 'static {
    type Response: Encode + Decode + Debug + Send + Sync + 'static;

    const SUBJECT: &'static str;
}
Expand description

Generic stream request where response is streamed using NatsClient::stream_response.

Used for cases where a large payload that doesn’t fit into NATS message needs to be sent or there is a very large number of messages to send. For simple request/response patten GenericRequest can be used instead.

Required Associated Types§

source

type Response: Encode + Decode + Debug + Send + Sync + 'static

Response type that corresponds to this stream request. These responses are send as a stream of GenericStreamResponses messages.

Required Associated Constants§

source

const SUBJECT: &'static str

Request subject with optional * in place of application instance to receive the request

Object Safety§

This trait is not object safe.

Implementors§