ipzone
Ipzone provides a simple and powerful IP architecture to Rust.
| Examples | Docs | Latest Note |
= "0.1.0"
Examples
use *;
const LOCAL: = Localhost;
// Localhost has implemented ToSocketAddrs trait so
// can server.bind(LOCAL);
// From environment variables
let local = Localhost;
// unwrap_or(8080) version is port::from_env!("PORT", 8080)
// From json files (features = "json")
// -- ../ports.json --
// [ 1234, 5678, 9101, 4321 ]
let local = Localhost;
// can truncate it, port::from_json("../ports.json"; 2) = [ 1234, 5678 ]
// Concatenating
let ports: = concatn!;
let local = Localhost;