| Crates.io | binrw_derive |
| lib.rs | binrw_derive |
| version | 0.15.0 |
| created_at | 2021-03-24 04:14:10.456659+00 |
| updated_at | 2025-05-05 21:43:59.112059+00 |
| description | Derive macro for binrw |
| homepage | https://binrw.rs |
| repository | https://github.com/jam1garner/binrw |
| max_upload_size | |
| id | 372818 |
| size | 243,187 |
In all cases, look to existing directives to follow established code and test conventions.
binrw::parser::keywords.binrw::parser::attrs. If you
need a new meta-type, add it to meta_types along with tests.CondEndian), add
that to a new binrw::parser::types module and export it from
binrw::parser::types. New types must ultimately implement
binrw::parser::TrySet, but can sometimes do so more simply (using trait
generic impls) by implementing From or TryFrom instead.binrw::parser::top_level_attrs and binrw::parser::field_level_attrs.ReadMode), add validation in either FromInput::push_field (if the
validation can occur immediately after the field is constructed) or
FromInput::validate (if it can only be validated after the entire struct
has been parsed).binrw::codegen::read_options and binrw::codegen::write_options.binrw crate’s tests directory.binrw::parser::tests (in mod.rs)
and add identical trybuild tests to the binrw crate’s tests/ui directory.
(A nightly compiler is required to run the trybuild tests; see the comment in
binrw::tests::ui for more detail.)