| //! Helper macros for the [rusticata](https://github.com/rusticata) project. |
| //! This crate contains some additions to [nom](https://github.com/Geal/nom). |
| //! For example, the [`combinator::cond_else`] function allows to apply the first parser if the |
| //! condition is true, and the second if the condition is false: |
| //! # use nom::combinator::map; |
| //! # use nom::number::streaming::*; |
| //! use rusticata_macros::combinator::cond_else; |
| //! # fn parser(s:&[u8]) { |
| //! let r: IResult<_, _, ()> = cond_else( |
| //! map(be_u8, u16::from) |
| //! See the documentation for more details and examples. |