#eui-48 #no-std #eui-64 #eui

no-std eui-no-std

EUI-48 and EUI-64 no-std implementation

8 releases

0.3.1 May 25, 2020
0.3.0 Nov 12, 2019
0.2.4 Nov 11, 2019
0.2.1 Oct 2, 2019
0.1.0 Sep 18, 2019

#6 in #eui-48

29 downloads per month

MIT license

27KB
685 lines

eui-no-std

crates.io Build Status codecov

EUI-48 and EUI-64 no-std implementation using heapless.

Usage

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"] }

Example

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");

lib.rs:

EUI-48 and EUI-64 no-std implementation using heapless.

Example

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");

Dependencies

~2MB
~51K SLoC