File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -268,12 +268,18 @@ writer.append_ser(test).unwrap();
268
268
let encoded = writer . into_inner ();
269
269
```
270
270
271
+ #### Importance of the fields' order
272
+
273
+ * Important* : The order of the fields in the struct must match the order of the fields in the Avro schema!
274
+
275
+ #### Simple types
276
+
271
277
The vast majority of the times, schemas tend to define a record as a top-level container
272
278
encapsulating all the values to convert as fields and providing documentation for them, but in
273
279
case we want to directly define an Avro value, any type implementing ` Serialize ` should work.
274
280
275
281
``` rust
276
- let mut value = " foo" . to_string ();
282
+ let value = " foo" . to_string ();
277
283
```
278
284
279
285
### Using codecs to compress data
Original file line number Diff line number Diff line change 283
283
//! let encoded = writer.into_inner();
284
284
//! ```
285
285
//!
286
+ //! ### Importance of the fields' order
287
+ //!
288
+ //! *Important*: The order of the fields in the struct must match the order of the fields in the Avro schema!
289
+ //!
290
+ //! ### Simple types
291
+ //!
286
292
//! The vast majority of the times, schemas tend to define a record as a top-level container
287
293
//! encapsulating all the values to convert as fields and providing documentation for them, but in
288
294
//! case we want to directly define an Avro value, any type implementing `Serialize` should work.
289
295
//!
290
296
//! ```
291
- //! let mut value = "foo".to_string();
297
+ //! let value = "foo".to_string();
292
298
//! ```
293
299
//!
294
300
//! ## Using codecs to compress data
You can’t perform that action at this time.
0 commit comments