getip

Crates.iogetip
lib.rsgetip
version0.1.0
sourcesrc
created_at2024-07-25 14:08:38.561495
updated_at2024-07-25 14:08:38.561495
descriptionFind the public IP address of a device
homepagehttps://github.com/rexagon/getip
repositoryhttps://github.com/rexagon/getip
max_upload_size
id1315067
size12,774
Ivan Kalinin (Rexagon)

documentation

https://docs.rs/getip

README

getip

A small crate to find the public IP address of a device.

[!NOTE] This crate is just an updated and minified version of https://github.com/avitex/rust-public-ip

Example

#[tokio::main]
async fn main() {
    match getip::addr().await {
        Ok(addr) => println!("My address is: {addr:?}"),
        Err(e) => println!("Failed to resolve: {e:?}"),
    }
}
Commit count: 0

cargo fmt