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, buffer: &mut Vec<u8>)
| 31 | /// be valid with regards to the schema. Schema are needed only to guide the |
| 32 | /// encoding for complex type values. |
| 33 | pub fn encode(value: &Value, schema: &Schema, buffer: &mut Vec<u8>) { |
| 34 | encode_ref(value, schema.top_node(), buffer) |
| 35 | } |
| 36 | |
| 37 | fn encode_bytes<B: AsRef<[u8]> + ?Sized>(s: &B, buffer: &mut Vec<u8>) { |
| 38 | let bytes = s.as_ref(); |