socketv4

Macro socketv4 

Source
socketv4!() { /* 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!(socketv4!("192.168.1.5:3000"), std::net::SocketAddrV4::new(std::net::Ipv4Addr::new(192, 168, 1, 5), 3000));