@@ -20,23 +20,21 @@ use alloc::{
20
20
vec:: Vec ,
21
21
} ;
22
22
23
- /// Trait extending [`WriteWithPos`] with methods providing
24
- /// alignment, serialization of named data, and writing of byte slices
25
- /// of zero-copy types.
23
+ /// Trait extending [`WriteWithPos`] with methods providing alignment,
24
+ /// serialization of named data, and writing of byte slices of zero-copy types.
26
25
///
27
- /// The purpose of this trait is that of interposing between [`SerInner`]
28
- /// and the underlying [`WriteWithPos`] a layer in which serialization operations
26
+ /// The purpose of this trait is that of interposing between [`SerInner`] and
27
+ /// the underlying [`WriteWithPos`] a layer in which serialization operations
29
28
/// can be easily intercepted and recorded. In particular, serialization methods
30
29
/// must use the methods of this trait if they want to record the schema of the
31
30
/// serialized data; this is true (maybe counterintuitively) even of ancillary
32
- /// data such as tags and slice lengths: see [`helpers`] or the
33
- /// [implementation of `Option`](impls::prim) for examples.
34
- /// All methods have a default
31
+ /// data such as tags and slice lengths: see [`helpers`] or the [implementation
32
+ /// of `Option`](impls::prim) for examples. All methods have a default
35
33
/// implementation that must be replicated in other implementations.
36
34
///
37
35
/// There are two implementations of [`WriteWithNames`]: [`WriterWithPos`],
38
- /// which uses the default implementation, and [`SchemaWriter`],
39
- /// which additionally records a [`Schema`] of the serialized data.
36
+ /// which uses the default implementation, and [`SchemaWriter`], which
37
+ /// additionally records a [`Schema`] of the serialized data.
40
38
pub trait WriteWithNames : WriteWithPos + Sized {
41
39
/// Add some zero padding so that `self.pos() % V:max_size_of() == 0.`
42
40
///
0 commit comments