Trait LexiconParametersSerdes

Source
pub trait LexiconParametersSerdes<T> {
    const NAME: &'static str;
    const OFFSET_RANGES: &'static [Range<usize>];

    // Required methods
    fn serialize_params(params: &T, raw: &mut [u8]) -> Result<(), String>;
    fn deserialize_params(params: &mut T, raw: &[u8]) -> Result<(), String>;
}
Expand description

Serialize and deserialize parameters.

Required Associated Constants§

Source

const NAME: &'static str

Name of parameters.

Source

const OFFSET_RANGES: &'static [Range<usize>]

List of offset ranges for parameters.

Required Methods§

Source

fn serialize_params(params: &T, raw: &mut [u8]) -> Result<(), String>

Serialize parameters.

Source

fn deserialize_params(params: &mut T, raw: &[u8]) -> Result<(), String>

Deserialize parameters.

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§