File: README.md

package info (click to toggle)
rust-hex-slice 0.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 96 kB
  • sloc: makefile: 2
file content (18 lines) | stat: -rw-r--r-- 601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# hex-slice

[![Build Status](https://travis-ci.org/cstorey/hex-slice.svg?branch=master)](https://travis-ci.org/cstorey/hex-slice)

Renders a slice of integers (or anything else that supports the
[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:

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