pub trait FastCodesHeader {
// Required methods
fn encode_fast(&mut self, out: &mut BytesMut);
fn decode_fast(&mut self, fields: &HashMap<CheetahString, CheetahString>);
// Provided method
fn write_if_not_null(out: &mut BytesMut, key: &str, value: &str) { ... }
}๐Deprecated:
use CommandCustomHeader typed map/direct-binary APIs
Expand description
Legacy handwritten fast-header codec surface.
Production encoding uses
command_custom_header::CommandCustomHeader::encode_capability and
command_custom_header::CommandCustomHeader::encode_direct_binary.
Required Methodsยง
fn encode_fast(&mut self, out: &mut BytesMut)
๐Deprecated:
use CommandCustomHeader typed map/direct-binary APIs
fn decode_fast(&mut self, fields: &HashMap<CheetahString, CheetahString>)
๐Deprecated:
use CommandCustomHeader typed map/direct-binary APIs
Provided Methodsยง
fn write_if_not_null(out: &mut BytesMut, key: &str, value: &str)
๐Deprecated:
use CommandCustomHeader typed map/direct-binary APIs
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".