Crate prefix_hex

source ·
Expand description

The prefix-hex crates offers encoding and decoding of hex strings with a 0x prefix.

Its API aims to mimic that of the hex crate, which we also use internally.

This crate is compatible with the hex encoding rules of the Ethereum RPC API.

Enums

Traits

  • Tries to decode an hexadecimal encoded string with a 0x prefix.
  • Encodes data into an hexadecimal encoded string with a 0x prefix.

Functions

  • Decodes a hex string with 0x prefix into a type T.
  • Encodes T as a hex string with a 0x prefix.