Derive Macro dbn_macros::RecordDebug

source ·
#[derive(RecordDebug)]
{
    // Attributes available to this derive:
    #[dbn]
}
Expand description

Derive macro for Debug representations with the same extensions for DBN records as dbn_record.

Supports the following dbn attributes:

  • c_char: format the type as a char instead of as a numeric
  • fixed_price: format the integer as a fixed-precision decimal
  • fmt_binary: format as a binary
  • fmt_method: try to format by calling the getter method with the same name as the field. If the getter returns an error, the raw field value will be used
  • skip: won’t be included in the Debug output

Note: fields beginning with _ will automatically be skipped, e.g. _reserved isn’t included in the Debug output.