Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tranzystorekk/hexers

Rust iterator that encodes bytes into hex chars
https://github.com/tranzystorekk/hexers

hexadecimal iterators rust-library

Last synced: 21 days ago
JSON representation

Rust iterator that encodes bytes into hex chars

Awesome Lists containing this project

README

        

# libhexers - iterate over hex encoded bytes

This library provides utilities for automatically converting a byte
sequence to a hex encoded one via an iterator adaptor.

## Example

```rust
use hexers::Hexers;

let bytes = [0xbe_u8, 0xef_u8];
let mut it = bytes.iter().copied().hexed();

assert_eq!(it.next(), Some('b'));
assert_eq!(it.next(), Some('e'));
assert_eq!(it.next(), Some('e'));
assert_eq!(it.next(), Some('f'));
```