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

    const PROTOCOL_NAME: &'static str;
    const LOG_TARGET: &'static str;
}
Expand description

Generic request with associated response

Required Associated Constants§

source

const PROTOCOL_NAME: &'static str

Defines request-response protocol name.

source

const LOG_TARGET: &'static str

Specifies log-parameters for tracing.

Required Associated Types§

source

type Response: Encode + Decode + 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", so this trait is not object safe.

Implementors§

source§

impl GenericRequest for SegmentHeaderRequest

source§

const PROTOCOL_NAME: &'static str = "/subspace/segment-headers-by-indexes/0.1.0"

source§

const LOG_TARGET: &'static str = "segment-headers-by-indexes-request-response-handler"

source§

type Response = SegmentHeaderResponse

source§

impl GenericRequest for CachedPieceByIndexRequest

source§

const PROTOCOL_NAME: &'static str = "/subspace/cached-piece-by-index/0.1.0"

source§

const LOG_TARGET: &'static str = "cached-piece-by-index-request-response-handler"

source§

type Response = CachedPieceByIndexResponse

source§

impl GenericRequest for PieceByIndexRequest

source§

const PROTOCOL_NAME: &'static str = "/subspace/piece-by-index/0.1.0"

source§

const LOG_TARGET: &'static str = "piece-by-index-request-response-handler"

source§

type Response = PieceByIndexResponse