Registry / utility / rustc-hex

rustc-hex

JSON →
library2.1.0rscratesunverified

rustc-serialize compatible hex conversion traits

# Cargo.toml [dependencies] rustc-hex = "2.1.0"
INSTALL
IMPORT
SIG · RUSTC-HEX
R
rustc-hex
utilityrustv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ToHex
use rustc_hex::ToHex;

Converts a byte slice to a hex string.

use rustc_hex::ToHex; let bytes = vec![0xde, 0xad]; let hex = bytes.to_hex(); assert_eq!(hex, "dead");
Debug
Known issues
gotchaThis crate is a compatibility shim for rustc-serialize; consider using `hex` crate instead.
fix
Replace with `hex` crate for modern usage.
affects: >=2.0.0
Upgrade
Version history
2.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
rustc-hex — cargo add rustc-hex · libregistry