| 1 | # hex-slice |
| 2 | |
| 3 | [](https://travis-ci.org/cstorey/hex-slice) |
| 4 | |
| 5 | Renders a slice of integers (or anything else that supports the |
| 6 | [LowerHex](https://doc.rust-lang.org/std/fmt/trait.LowerHex.html) or [UpperHex](https://doc.rust-lang.org/std/fmt/trait.UpperHex.html) traits) as hex. For example, this: |
| 7 | |
| 8 | ```rust |
| 9 | extern crate hex_slice; |
| 10 | use hex_slice::AsHex; |
| 11 | |
| 12 | fn main() { |
| 13 | let foo = vec![0u32, 1 ,2 ,3]; |
| 14 | println!("{:x}", foo.as_hex()); |
| 15 | } |
| 16 | ``` |
| 17 | |
| 18 | Displays: `[0 1 2 3]` on standard output (available with `cargo run --example trivial`). |