Crates.io | eui-no-std |
lib.rs | eui-no-std |
version | 0.3.1 |
source | src |
created_at | 2019-09-18 22:11:05.673703 |
updated_at | 2020-05-25 09:00:07.874335 |
description | EUI-48 and EUI-64 no-std implementation. |
homepage | https://github.com/vagola/eui-no-std |
repository | https://github.com/vagola/eui-no-std |
max_upload_size | |
id | 165824 |
size | 28,529 |
EUI-48 and EUI-64 no-std implementation using heapless.
Add this to your Cargo.toml
:
[dependencies]
eui-no-std = "0.3"
Serde support can be enabled using features:
[dependencies]
eui-no-std = { version = "0.3", default-features = false, features = ["serde"] }
use eui::Eui48;
use eui::Eui64;
let eui48 = Eui48::from(85204980412143);
let eui64 = Eui64::from(eui48);
assert_eq!(eui48.to_string(), "4D-7E-54-97-2E-EF");
assert_eq!(eui64.to_string(), "4D-7E-54-00-00-97-2E-EF");