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

#1186 in Rust patterns

Download history 2237/week @ 2023-12-06 3246/week @ 2023-12-13 1900/week @ 2023-12-20 748/week @ 2023-12-27 1227/week @ 2024-01-03 1432/week @ 2024-01-10 1870/week @ 2024-01-17 2517/week @ 2024-01-24 1762/week @ 2024-01-31 1759/week @ 2024-02-07 2189/week @ 2024-02-14 1899/week @ 2024-02-21 2117/week @ 2024-02-28 1853/week @ 2024-03-06 1512/week @ 2024-03-13 1149/week @ 2024-03-20

7,075 downloads per month
Used in 37 crates (15 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