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

#412 in Rust patterns

Download history 473/week @ 2022-08-09 249/week @ 2022-08-16 279/week @ 2022-08-23 377/week @ 2022-08-30 478/week @ 2022-09-06 449/week @ 2022-09-13 454/week @ 2022-09-20 761/week @ 2022-09-27 580/week @ 2022-10-04 372/week @ 2022-10-11 485/week @ 2022-10-18 947/week @ 2022-10-25 1179/week @ 2022-11-01 767/week @ 2022-11-08 681/week @ 2022-11-15 521/week @ 2022-11-22

3,279 downloads per month
Used in 25 crates (13 directly)

MIT license

4KB
63 lines

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).


lib.rs:

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());
}

No runtime deps