Expand description
Efficient (de)serialization of Avro fixed values.
This module is intended to be used through the Serde with attribute.
Use apache_avro::serde::fixed_opt for optional fixed values.
See usage with below example:
#[derive(AvroSchema, Serialize, Deserialize)]
struct StructWithBytes {
#[avro(with)]
#[serde(with = "apache_avro::serde::bytes")]
vec_field: Vec<u8>,
#[avro(with = apache_avro::serde::fixed::get_schema_in_ctxt::<6>)]
#[serde(with = "apache_avro::serde::fixed")]
fixed_field: [u8; 6],
}Functionsยง
- deserialize
- get_
schema_ in_ ctxt - Returns
Schema::Fixed(N)namedserde_avro_fixed_{N} - serialize