commit | 699a46715432c25c4035f2274067546848629c88 | [log] [tgz] |
---|---|---|
author | Joel Galenson <jgalenson@google.com> | Mon Aug 30 21:50:16 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Aug 30 21:50:16 2021 +0000 |
tree | a7327c00c4ad66828baae503e55beb060509c093 | |
parent | 6c7134e00fd4054a02febd33fcf38e2b87ecc12a [diff] | |
parent | d3fcf5b74a112563c6ac649c2845e8d4a68cef88 [diff] |
Update TEST_MAPPING am: 3ea2811cdb am: f35604d898 am: 06ce5038dd am: d3fcf5b74a Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rusticata-macros/+/1813684 Change-Id: I13b5dfa264f921014dd18bffff80fb0057556787
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_u64
Serialize
for structures serializationq
(quote) and align32
upgrade_error
and upgrade_error_to
custom_check
flat_take
newtype_enum
parse_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.