Skip to main content

to_avro_datum_schemata

Function to_avro_datum_schemata 

Source
pub fn to_avro_datum_schemata<T: Into<Value>>(
    schema: &Schema,
    schemata: Vec<&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)
    .schemata(schemata)?
    .build()?
    .write_value_to_vec(value)

Encode a value into raw Avro data, also performs schema validation.

If the provided schema is incomplete then its dependencies must be provided in schemata