项目作者: lambda-fairy

项目描述 :
Please use `net-literals` instead:
高级语言: Rust
项目地址: git://github.com/lambda-fairy/ip-macro.git
创建时间: 2017-02-26T07:35:30Z
项目社区:https://github.com/lambda-fairy/ip-macro

开源协议:

下载


ip-macro

Build status
Cargo

Macros for writing literal IP addresses.

See https://github.com/rust-lang/rfcs/issues/1926 for the background behind this crate.

Rust nightly

This crate uses the recently implemented procedural macros feature, and so requires a nightly version of the compiler.

If you use rustup (recommended), then you can install Rust nightly using these instructions.

Example

  1. #![feature(proc_macro)] // <- Don't forget this!!!
  2. extern crate ip_macro;
  3. use ip_macro::ip;
  4. fn main() {
  5. println!("There's no place like {}", ip!("127.0.0.1"));
  6. }