Expand description
(De)serialize an Rust array ([T; N]) as an Avro Schema::Array.
This module is intended to be used through the Serde with attribute.
Use apache_avro::serde::array_opt for optional array values.
See usage with below example:
#[derive(AvroSchema, Serialize, Deserialize)]
struct StructWithArray {
#[avro(with = apache_avro::serde::array::get_schema_in_ctxt::<i32>)]
#[serde(with = "apache_avro::serde::array")]
array: [i32; 10],
}Functionsยง
- deserialize
- get_
record_ fields_ in_ ctxt - Returns
None - get_
schema_ in_ ctxt - Returns
Schema::Array(T::get_schema_in_ctxt()) - serialize