local-ip-addr

Crates.iolocal-ip-addr
lib.rslocal-ip-addr
version0.1.1
sourcesrc
created_at2023-01-30 08:47:41.840817
updated_at2023-01-30 10:14:44.892378
descriptionA simple library for getting the local IP address of the current host
homepage
repositoryhttps://github.com/tsirysndr/local-ip-addr
max_upload_size
id771544
size14,181
Tsiry Sandratraina (tsirysndr)

documentation

README

local-ip-addr

License: MIT

A simple library for getting the local IP address of the current host.

Usage

Add this to your Cargo.toml:

[dependencies]
local-ip-addr = "0.1"

Example

use local_ip_addr::get_local_ip_address;

fn main() {
    let ip_addr = get_local_ip_address().unwrap();
    println!("Local IP address: {}", ip_addr);
}
Commit count: 4

cargo fmt