| commit | db480a77f29a691c8e84270bc79eb8984220c661 | [log] [tgz] |
|---|---|---|
| author | Joel Galenson <jgalenson@google.com> | Wed Dec 15 18:07:13 2021 +0000 |
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Dec 15 18:07:13 2021 +0000 |
| tree | cfae57bccaa32b6ac56b3c6eec93404b973c5c10 | |
| parent | 490393037832351786534056119e7933b45165d8 [diff] | |
| parent | 5b16bd67d0d3efec2c90a2c4586f9dce8d62b8e6 [diff] |
Merge "Refresh Android.bp, cargo2android.json, TEST_MAPPING." am: 3575b7b428 am: f433681a48 am: 291145e8f1 am: 5b16bd67d0 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rusticata-macros/+/1912695 Change-Id: Ideb2ebaf237cfb40d230b6bbb57a50ce773abfba
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 4.x depends on nom 7rusticata-macros 3.x depends on nom 6rusticata-macros 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.