Skip to content

Commit b7d60d9

Browse files
committed
parser combinators: add a few notes for how to use them
1 parent 858e281 commit b7d60d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/parsers/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
//! about the allowed input. Depending on the data format that needs
55
//! to be handled the functions here might help implementing custom
66
//! parsers.
7+
//!
8+
//! The parser combinators that take an `address_parser` can either
9+
//! take `FromStr::from_str` or a non-default parser like [`parse_loose_ip`].
10+
//! They are used to parse addresses (either as part of a `"/"` separated
11+
//! notation or as single host).
12+
//!
13+
//! Parser combinators that take an additional `host_parser` use that
14+
//! to parse strings that don't have an `"/"` separator - usually these
15+
//! should return Cidr/Inet "host" values, but they can allow special
16+
//! syntax like [`parse_short_ip_cidr`] to represent non-host networks too.
717
818
mod combinators;
919
mod inetaddr;

0 commit comments

Comments
 (0)