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

#1534 in Rust patterns

Download history 1332/week @ 2024-11-21 1722/week @ 2024-11-28 1576/week @ 2024-12-05 2128/week @ 2024-12-12 1541/week @ 2024-12-19 1022/week @ 2024-12-26 1750/week @ 2025-01-02 3219/week @ 2025-01-09 1826/week @ 2025-01-16 1967/week @ 2025-01-23 1550/week @ 2025-01-30 1860/week @ 2025-02-06 1493/week @ 2025-02-13 2039/week @ 2025-02-20 2091/week @ 2025-02-27 1450/week @ 2025-03-06

7,424 downloads per month
Used in 52 crates (18 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