Crate fixed_hash
source ·Macros
Construct a fixed-size hash type.
Takes the name of the type and the size in bytes and an optional third argument for meta data
Example:
construct_hash!(H256, 32);
Example: construct_hash!(H160, 20, cfg_attr(feature = "serialize", derive(Serialize, Deserialize)));
Implements conversion to and from hash types of different sizes. Uses the
last bytes, e.g.
From<H256> for H160
uses bytes 12..32
CAUTION: make sure to call with correct sizes and the bigger type first or
bad things will happen!Functions
clean_0xDeprecated
Return
s
without the 0x
at the beginning of it, if any.