Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vaigarashi/eui-no-std
EUI-48 and EUI-64 no-std implementation
https://github.com/vaigarashi/eui-no-std
eui eui-48 eui-64 no-std rust
Last synced: about 1 month ago
JSON representation
EUI-48 and EUI-64 no-std implementation
- Host: GitHub
- URL: https://github.com/vaigarashi/eui-no-std
- Owner: vaIgarashi
- License: mit
- Created: 2019-09-17T14:30:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T08:59:29.000Z (over 4 years ago)
- Last Synced: 2024-10-29T00:51:07.225Z (about 2 months ago)
- Topics: eui, eui-48, eui-64, no-std, rust
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
eui-no-std
============
[![crates.io](https://img.shields.io/crates/v/eui-no-std.svg)](https://crates.io/crates/eui-no-std)
[![Build Status](https://travis-ci.org/vagola/eui-no-std.svg?branch=master)](https://travis-ci.org/vagola/eui-no-std)
[![codecov](https://codecov.io/gh/vagola/eui-no-std/branch/master/graph/badge.svg)](https://codecov.io/gh/vagola/eui-no-std)EUI-48 and EUI-64 no-std implementation using heapless.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
eui-no-std = "0.3"
```Serde support can be enabled using features:
```toml
[dependencies]
eui-no-std = { version = "0.3", default-features = false, features = ["serde"] }
```## Example
```rust
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");
```