shellrow / netdev

Cross-platform library for network interface and gateway. Written in Rust.
MIT License
65 stars 12 forks source link

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

Open brainplot opened 1 year ago

brainplot commented 1 year ago

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

This, however, would be a pretty major breaking change in the public API. If you agree with this change, I can attempt writing a PR.

shellrow commented 1 year ago

Thank you for your proposal, and I appreciate your suggestion regarding memory optimization. I agree with the proposed change. As part of my roadmap, planning to make changes to the public API up to version 1.0.0, and this memory optimization fits into efforts to enhance the library's functionality and performance.

If you have any questions or further suggestions, please feel free to let me know.

brainplot commented 1 year ago

Would you consider PRs or would you rather work on this yourself?

shellrow commented 1 year ago

Please feel free to proceed with the PR, and I'll actively review and collaborate on the changes.