ipify-async 0.1.1

A simple asynchronous library for obtaining your public IP
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 3.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.98 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 7s Average build duration of successful builds.
  • all releases: 1m 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • colinbruner

ipify-async

A simple asynchronous library for obtaining your public IP address within Rust code.

Example

The following is a simple example using the library while leveraging the tokio runtime.

use ipify_async;

type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync + 'static>>;

#[tokio::main]
async fn main() -> Result<()> {
    let ip = ipify_async::get_ip().await.unwrap().to_string();
    println!("{:?}", ip);
    Ok(())
}