Crate prefix_hex

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§

Error

Traits§

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

Functions§

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