pub trait ChunkData {
const CHANNEL: Channel;
const MESSAGE_TYPE: MessageType;
}
Expand description
Uniforms chunk data by a channel numbers and a message type.
When writing into streams, we are required to imprint a chunk ID and a message type ID into their headers.
This makes you to reduce its cost.
For example, write_chunk
use this for writing chunks correctly.
Required Associated Constants§
const CHANNEL: Channel
const MESSAGE_TYPE: MessageType
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.