socketv6

Macro socketv6 

Source
socketv6!() { /* proc-macro */ }
Expand description

Generates a socket address from its string representation

§Syntax

This macro works as a function which take only one argument: the string representation of a socket address

§Example


assert_eq!(socketv6!("[::1]:3000"), std::net::SocketAddrV6::new(std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 3000, 0, 0));
assert_eq!(socketv6!("[::]:8080", 58, 30), std::net::SocketAddrV6::new(std::net::Ipv6Addr::UNSPECIFIED, 8080, 58, 30));