Hi,
Currently, NetworkInterface's mac_addr member is a Option<String>. It would be nice to have a simple MacAddr type, like:
pub struct MacAddr([u8; 6]);
with a From<[u8; 6]> impl and an octets method that returns [u8; 6].
Since mac_addr currently uses a String, it's unclear if it's uppercase, lowercase, in xx:xx:xx:xx:xx:xx format, or in xx-xx-xx-xx-xx-xx format. This will make comparisons easier. I can attempt a pull request if you agree with the idea. Thanks
Hi,
Currently, NetworkInterface's
mac_addrmember is aOption<String>. It would be nice to have a simpleMacAddrtype, like:with a From<[u8; 6]> impl and an octets method that returns [u8; 6].
Since
mac_addrcurrently uses a String, it's unclear if it's uppercase, lowercase, inxx:xx:xx:xx:xx:xxformat, or inxx-xx-xx-xx-xx-xxformat. This will make comparisons easier. I can attempt a pull request if you agree with the idea. Thanks