Attribute Macro binrw::binrw

source ·
#[binrw]
Expand description

Attribute macro used to generate an impl of both BinRead and BinWrite traits with support for temporary variables.

When using temporary variables, this attribute must be placed above other attributes that generate code (e.g. #[derive(Debug)]) to ensure that the deleted temporary fields aren’t visible to those macros.

See the directives glossary for usage details.