Encode a `Value` into avro format. NOTE** This will not perform schema validation. The value is assumed to be valid with regards to the schema. Schema are needed only to guide the encoding for complex type values.
(value: &Value, schema: &Schema, writer: &mut W)
| 36 | /// be valid with regards to the schema. Schema are needed only to guide the |
| 37 | /// encoding for complex type values. |
| 38 | pub fn encode<W: Write>(value: &Value, schema: &Schema, writer: &mut W) -> AvroResult<usize> { |
| 39 | let rs = ResolvedSchema::try_from(schema)?; |
| 40 | encode_internal(value, schema, rs.get_names(), None, writer) |
| 41 | } |
| 42 | |
| 43 | /// Encode `s` as the _bytes_ primitive type. |
| 44 | /// |