Module apache_avro::serde_avro_fixed
source · Expand description
Efficient (de)serialization of Avro fixed values.
This module is intended to be used through the Serde with
attribute. Use
serde_avro_fixed_opt
for optional fixed values.
See usage with below example:
use apache_avro::{serde_avro_bytes, serde_avro_fixed};
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
struct StructWithBytes {
#[serde(with = "serde_avro_bytes")]
vec_field: Vec<u8>,
#[serde(with = "serde_avro_fixed")]
fixed_field: [u8; 6],
}