Trait subspace_networking::GenericRequest

source ·
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 Types§

source

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

Response type that corresponds to this request

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.

Object Safety§

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"

§

type Response = SegmentHeaderResponse

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"

§

type Response = PieceByIndexResponse