Skip to main content

CodecConfig

Trait CodecConfig 

Source
pub trait CodecConfig {
    const MAX_REQUEST_BYTES: usize;
    const MAX_RESPONSE_BYTES: usize;
    const DECODE_TIMEOUT: Duration;
}
Expand description

Per-protocol codec limits. Implementors set tight values for fixed-shape protocols (Hello) and generous ones for bulk transfers (ChainExchange).

Required Associated Constants§

Source

const MAX_REQUEST_BYTES: usize

Source

const MAX_RESPONSE_BYTES: usize

Source

const DECODE_TIMEOUT: Duration

Aborts the read if the peer hasn’t finished writing within this window.

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§