pub fn to_avro_datum<T: Into<Value>>(
schema: &Schema,
value: T,
) -> AvroResult<Vec<u8>>
Expand description
Encode a compatible value (implementing the ToAvro
trait) into Avro format, also
performing schema validation.
NOTE This function has a quite small niche of usage and does NOT generate headers and sync
markers; use Writer
to be fully Avro-compatible if you don’t know what
you are doing, instead.