commit | c0c78ba6d240bcde55ae63f8bdf38b2462ca9a3c | [log] [tgz] |
---|---|---|
author | Joel Galenson <[email protected]> | Thu Sep 23 15:12:36 2021 +0000 |
committer | Automerger Merge Worker <[email protected]> | Thu Sep 23 15:12:36 2021 +0000 |
tree | 285b40d1c45383cd37e4017e216c185609689b32 | |
parent | 699a46715432c25c4035f2274067546848629c88 [diff] | |
parent | 8b5950bb30eab2c5e72054f4ca2badf772386605 [diff] |
Upgrade rust/crates/rusticata-macros to 4.0.0 am: dcd5c5237a am: 1a0cb4be2d am: c3671ee3ea am: 8b5950bb30 Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/rusticata-macros/+/1832969 Change-Id: I7aabdd054d7fcb18afe736093c563e49900d7e2c
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_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.