Function mz_avro::write_avro_datum

source ·
pub fn write_avro_datum<T: ToAvro>(
    schema: &Schema,
    value: T,
    buffer: &mut Vec<u8>
) -> Result<(), Error>
Expand description

Encode a compatible value (implementing the ToAvro trait) into Avro format, also performing schema validation.

This is a function which gets the bytes buffer where to write as parameter instead of creating a new one like to_avro_datum.