EstebanBorai / network-interface

Retrieve system's Network Interfaces on Linux, macOS and Windows on a standardized manner
https://crates.io/crates/network-interface
Apache License 2.0
61 stars 28 forks source link

Ideally `show()` should return an `Iterator` #45

Open brainplot opened 11 months ago

brainplot commented 11 months ago

Returning some iterator type instead of the whole Vec directly would allow consumers to have more control over how memory is allocated.

EstebanBorai commented 11 months ago

Hi @brainplot! Thanks for your interest in this crate!

I think returning an iterator is more flexible yet performant.

Perhaps we could have a major release using that approach instead of allocating the whole vector of network interfaces.

Are you interested in working on this?

brainplot commented 11 months ago

Are you interested in working on this?

Yes, I can try to have a crack at this. I'm considering this crate for a project I'm working on.