Skip to content

Commit

Permalink
Document _init_and_read_* ser macro requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinewallace committed Aug 23, 2023
1 parent ebb0676 commit ea84f2a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lightning/src/util/ser_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,9 @@ macro_rules! _init_tlv_field_var {

/// Equivalent to running [`_init_tlv_field_var`] then [`read_tlv_fields`].
///
/// If any unused values are read, their type MUST be specified or else `rustc` will read them as an
/// `i64`.
///
/// This is exported for use by other exported macros, do not use directly.
#[doc(hidden)]
#[macro_export]
Expand All @@ -807,6 +810,9 @@ macro_rules! _init_and_read_len_prefixed_tlv_fields {
}

/// Equivalent to running [`_init_tlv_field_var`] then [`decode_tlv_stream`].
///
/// If any unused values are read, their type MUST be specified or else `rustc` will read them as an
/// `i64`.
macro_rules! _init_and_read_tlv_stream {
($reader: ident, {$(($type: expr, $field: ident, $fieldty: tt)),* $(,)*}) => {
$(
Expand Down

0 comments on commit ea84f2a

Please sign in to comment.