cidr/inet/from_str.rs
1use crate::{
2 errors::NetworkParseError,
3 local_addr_parser::ParseableAddress,
4 Inet,
5};
6
7pub fn inet_from_str<I>(s: &str) -> Result<I, NetworkParseError>
8where
9 I: Inet,
10 I::Address: ParseableAddress,
11{
12 // TODO: use strict FromStr::from_str address parsing with version bump
13 crate::parsers::parse_inet(s, I::Address::address_from_str)
14}