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

    const SUBJECT: &'static str;
}
Expand description

Generic request with associated response.

Used for cases where request/response pattern is needed and response contains a single small message. For large messages or multiple messages chunking with GenericStreamRequest can be used instead.

Required Associated Types§

source

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

Response type that corresponds to this request

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§