5 releases

Uses old Rust 2015

0.1.4 Mar 2, 2018
0.1.3 Mar 2, 2018
0.1.2 Oct 23, 2017
0.1.1 Oct 23, 2017
0.1.0 May 3, 2016

#1767 in Rust patterns

Download history 1651/week @ 2025-05-25 1509/week @ 2025-06-01 3192/week @ 2025-06-08 4687/week @ 2025-06-15 5901/week @ 2025-06-22 5584/week @ 2025-06-29 5741/week @ 2025-07-06 4737/week @ 2025-07-13 4147/week @ 2025-07-20 3256/week @ 2025-07-27 4940/week @ 2025-08-03 8113/week @ 2025-08-10 6152/week @ 2025-08-17 7971/week @ 2025-08-24 8413/week @ 2025-08-31 7951/week @ 2025-09-07

31,096 downloads per month
Used in 97 crates (17 directly)

MIT license

5KB
63 lines

The purpose of this crate is to extend the UpperHex and LowerHex traits to slices, as well as the integers it is currently implemented for.

Examples

extern crate hex_slice;
use hex_slice::AsHex;

fn main() {
    let foo = vec![0u32, 1 ,2 ,3];
    println!("{:x}", foo.as_hex());
}

hex-slice

Build Status

Renders a slice of integers (or anything else that supports the LowerHex or UpperHex traits) as hex. For example, this:

extern crate hex_slice;
use hex_slice::AsHex;

fn main() {
    let foo = vec![0u32, 1 ,2 ,3];
    println!("{:x}", foo.as_hex());
}

Displays: [0 1 2 3] on standard output (available with cargo run --example trivial).

No runtime deps