@@ -17,15 +17,15 @@ use crate::{
1717///
1818/// If a '/' is found, parse trailing number as prefix length and leading address with `address_parser`.
1919/// Otherwise parse with `host_parser`.
20- pub fn parse_cidr_full < C , AP , NP > (
20+ pub fn parse_cidr_full < C , AP , HP > (
2121 s : & str ,
2222 address_parser : AP ,
23- host_parser : NP ,
23+ host_parser : HP ,
2424) -> Result < C , NetworkParseError >
2525where
2626 C : Cidr ,
2727 AP : FnOnce ( & str ) -> Result < C :: Address , AddrParseError > ,
28- NP : FnOnce ( & str ) -> Result < C , NetworkParseError > ,
28+ HP : FnOnce ( & str ) -> Result < C , NetworkParseError > ,
2929{
3030 match s. rfind ( '/' ) {
3131 None => host_parser ( s) ,
@@ -48,15 +48,15 @@ where
4848/// Parse [`Cidr`] with custom address and network (when no '/' separator was found) parser
4949///
5050/// Similar to [`parse_cidr_full`] but ignores host bits in addresses.
51- pub fn parse_cidr_full_ignore_hostbits < C , AP , NP > (
51+ pub fn parse_cidr_full_ignore_hostbits < C , AP , HP > (
5252 s : & str ,
5353 address_parser : AP ,
54- host_parser : NP ,
54+ host_parser : HP ,
5555) -> Result < C , NetworkParseError >
5656where
5757 C : Cidr ,
5858 AP : FnOnce ( & str ) -> Result < C :: Address , AddrParseError > ,
59- NP : FnOnce ( & str ) -> Result < C , NetworkParseError > ,
59+ HP : FnOnce ( & str ) -> Result < C , NetworkParseError > ,
6060{
6161 match s. rfind ( '/' ) {
6262 None => host_parser ( s) ,
@@ -89,14 +89,14 @@ where
8989/// Return [`AnyIpCidr::Any`] for `"any"`.
9090/// If a '/' is found, parse trailing number as prefix length and leading address with `address_parser`.
9191/// Otherwise parse with `host_parser`.
92- pub fn parse_any_cidr_full < AP , NP > (
92+ pub fn parse_any_cidr_full < AP , HP > (
9393 s : & str ,
9494 address_parser : AP ,
95- host_parser : NP ,
95+ host_parser : HP ,
9696) -> Result < AnyIpCidr , NetworkParseError >
9797where
9898 AP : FnOnce ( & str ) -> Result < IpAddr , AddrParseError > ,
99- NP : FnOnce ( & str ) -> Result < IpCidr , NetworkParseError > ,
99+ HP : FnOnce ( & str ) -> Result < IpCidr , NetworkParseError > ,
100100{
101101 if s == "any" {
102102 return Ok ( AnyIpCidr :: Any ) ;
@@ -124,14 +124,14 @@ where
124124/// Parse [`AnyIpCidr`] with custom address and network (when no '/' separator was found) parser
125125///
126126/// Similar to [`parse_any_cidr_full`] but ignores host bits in addresses.
127- pub fn parse_any_cidr_full_ignore_hostbits < AP , NP > (
127+ pub fn parse_any_cidr_full_ignore_hostbits < AP , HP > (
128128 s : & str ,
129129 address_parser : AP ,
130- host_parser : NP ,
130+ host_parser : HP ,
131131) -> Result < AnyIpCidr , NetworkParseError >
132132where
133133 AP : FnOnce ( & str ) -> Result < IpAddr , AddrParseError > ,
134- NP : FnOnce ( & str ) -> Result < IpCidr , NetworkParseError > ,
134+ HP : FnOnce ( & str ) -> Result < IpCidr , NetworkParseError > ,
135135{
136136 if s == "any" {
137137 return Ok ( AnyIpCidr :: Any ) ;
@@ -165,15 +165,15 @@ where
165165///
166166/// If a '/' is found, parse trailing number as prefix length and leading address with `address_parser`.
167167/// Otherwise parse with `host_parser`.
168- pub fn parse_inet_full < I , AP , NP > (
168+ pub fn parse_inet_full < I , AP , HP > (
169169 s : & str ,
170170 address_parser : AP ,
171- host_parser : NP ,
171+ host_parser : HP ,
172172) -> Result < I , NetworkParseError >
173173where
174174 I : Inet ,
175175 AP : FnOnce ( & str ) -> Result < I :: Address , AddrParseError > ,
176- NP : FnOnce ( & str ) -> Result < I , NetworkParseError > ,
176+ HP : FnOnce ( & str ) -> Result < I , NetworkParseError > ,
177177{
178178 match s. rfind ( '/' ) {
179179 None => host_parser ( s) ,
0 commit comments