pub fn to_avro_datum<T: Into<Value>>(
schema: &Schema,
value: T,
) -> AvroResult<Vec<u8>>๐Deprecated since 0.22.0:
Use GenericDatumWriter instead
Expand description
Deprecated. Use GenericDatumWriter instead.
This is equivalent to:
โ
GenericDatumWriter::builder(schema)
.build()?
.write_value_to_vec(value)Encode a value into raw Avro data, also performs 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.