Crates.io | get_all_interfaces |
lib.rs | get_all_interfaces |
version | 0.1.1 |
source | src |
created_at | 2023-09-03 01:30:48.621529 |
updated_at | 2023-09-03 02:58:47.386273 |
description | Checks for all active interfaces on your device |
homepage | |
repository | https://github.com/codemanfreecodes/get_all_interfaces_01 |
max_upload_size | |
id | 962014 |
size | 4,883 |
A Rust crate for checking and listing all network interfaces on a device.
This Rust crate provides a simple and straightforward way to retrieve a list of all network interfaces available on a device. It abstracts the platform-specific details and offers a unified interface for cross-platform compatibility.
To use this crate in your Rust project, add this in your main.rc
:
extern crate get_all_interfaces;
fn main() {
let interface = get_all_interfaces::select_network_interface();
match interface {
Some(iface) => println!("Selected interface: {}", iface.name),
None => println!("No network interface selected."),
}
}