Skip to main content

GenericRequest

Trait GenericRequest 

Source
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 Constants§

Source

const SUBJECT: &'static str

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

Required Associated Types§

Source

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

Response type that corresponds to this request

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§