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

#1303 in Rust patterns

Download history 1513/week @ 2024-03-14 1423/week @ 2024-03-21 1669/week @ 2024-03-28 1654/week @ 2024-04-04 1825/week @ 2024-04-11 1789/week @ 2024-04-18 1094/week @ 2024-04-25 1130/week @ 2024-05-02 1262/week @ 2024-05-09 1360/week @ 2024-05-16 1449/week @ 2024-05-23 1789/week @ 2024-05-30 1068/week @ 2024-06-06 1190/week @ 2024-06-13 1001/week @ 2024-06-20 872/week @ 2024-06-27

4,413 downloads per month
Used in 45 crates (16 directly)

MIT license

5KB
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