File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 13
13
//! [`Readable`]: crate::util::ser::Readable
14
14
//! [`Writeable`]: crate::util::ser::Writeable
15
15
16
+ // There are quite a few TLV serialization "types" which behave differently. We currently only
17
+ // publicly document the `optional` and `required` types, not supporting anything else publicly and
18
+ // changing them at will.
19
+ //
20
+ // Some of the other types include:
21
+ // * (default_value, $default) - reads optionally, writing $default if no TLV is present
22
+ // * (static_value, $value) - ignores any TLVs, always using $value
23
+ // * required_vec - reads into a Vec without a length prefix, failing if no TLV is present.
24
+ // * optional_vec - reads into an Option<Vec> without a length prefix, continuing if no TLV is
25
+ // present. Writes from a Vec directly, only if any elements are present. Note
26
+ // that the struct deserialization macros return a Vec, not an Option.
27
+ // * upgradable_option - reads via MaybeReadable.
28
+ // * upgradable_required - reads via MaybeReadable, requiring a TLV be present but may return None
29
+ // if MaybeReadable::read() returns None.
30
+
16
31
/// Implements serialization for a single TLV record.
17
32
/// This is exported for use by other exported macros, do not use directly.
18
33
#[ doc( hidden) ]
You can’t perform that action at this time.
0 commit comments