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
async
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
#[tokio::main]
async fn main() {
match getip::addr().await {
Ok(addr) => println!("My address is: {addr:?}"),
Err(e) => println!("Failed to resolve: {e:?}"),
}
}