| Crates.io | ipify_api |
| lib.rs | ipify_api |
| version | 1.0.0 |
| created_at | 2018-08-22 12:10:05.080902+00 |
| updated_at | 2018-08-22 12:10:05.080902+00 |
| description | ipify client |
| homepage | https://github.com/aulisius/ipify-rs.git |
| repository | https://github.com/aulisius/ipify-rs.git |
| max_upload_size | |
| id | 80737 |
| size | 3,430 |
This crate provides functionalities to retrieve your public IP. It uses hyper along with ipify. Works only on HTTP.
extern crate hyper;
extern crate ipify_api;
use hyper::rt::{self, Future};
fn main() {
rt::run(
ipify_api::get_ip("http://my-ipify-instance.rs")
.map(|ip| println!("{}", ip))
.map_err(|e| println!("{}", e)),
);
}