ipv4_rep
x for ipv4_rep
parse_addr
- Convert a str to ip_addr
parse_to_ipv4_rep
try_parse_addr
ipv4_rep
type ipv4_rep = {a: u8, b: u8, c: u8, d: u8,}
x for ipv4_rep
as_u32
unsafe fn as_u32() -> u32
parse_addr
fn parse_addr(ip: str) -> ip_addr
Convert a str to ip_addr
Fails if the string is not a valid IPv4 address
x.x.x.x
ip_addr
of the ipv4
variantparse_to_ipv4_rep
fn parse_to_ipv4_rep(ip: str) -> result::result<ipv4_rep, str>
try_parse_addr
fn try_parse_addr(ip: str) -> result::result<ip_addr, parse_addr_err>