fedimint_core::encoding

Module as_hex

Source
Expand description

Serde implementations using hex-encoded encodables

Oftentimes it’s convenient to de/serialize consensus encodable data as using consensus encoding (wrapped in hex encoding).

If you have just a field use just:

#[serde(with = "::fedimint_core::encoding::as_hex")] EncodableType,

If you want to do it for the whole struct, use crate::serde_as_encodable_hex macro.

Functions§