| commit | ebb187258f97aff0a9e7a0e31b3233b5570f3266 | [log] [tgz] |
|---|---|---|
| author | Yiming Jing <yimingjing@google.com> | Fri Jul 16 13:15:12 2021 -0700 |
| committer | Yiming Jing <yimingjing@google.com> | Fri Jul 16 13:15:12 2021 -0700 |
| tree | 293b11b9b7e5c859eda0cc9fa0d558321a90fb92 | |
| parent | 61f3cdd73fa997537b62c352e6b36c9b271246da [diff] |
Initial import of rusticata-macros-3.1.0 Bug: 193833713 Change-Id: I8c64a1f7a387fb4162d80d201b1cfcd7172ed0f3
Helper macros for the rusticata project.
This crate contains some additions to nom.
For example, the error_if! macro allows to test a condition and return an error from the parser if the condition fails:
use rusticata_macros::error_if; let r : IResult<&[u8],()> = do_parse!( s, l: be_u8 >> error_if!(l < 4, ErrorKind::Verify) >> data: take!(l - 4) >> (()) );
See the documentation for more details and examples.
Different versions of this crate are available, depending on nom version.
rusticata-macros 0.3.x depends on nom 6rusticata-macros 0.2.x depends on nom 5Crate is documented, do running cargo doc will crate the offline documentation.
Reference documentation can be found here
be_var_u64 and le_var_u64Serialize for structures serializationq (quote) and align32upgrade_error and upgrade_error_tocustom_checkflat_takenewtype_enumparse_uint24 as deprecatedLicensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.