Function breez_sdk_core::bitcoin::bech32::encode_to_fmt

pub fn encode_to_fmt<T>(
    fmt: &mut dyn Write,
    hrp: &str,
    data: T,
    variant: Variant,
) -> Result<Result<(), Error>, Error>
where T: AsRef<[u5]>,
Expand description

Encode a bech32 payload to an fmt::Write. This method is intended for implementing traits from std::fmt.

§Errors

  • If [check_hrp] returns an error for the given HRP.

§Deviations from standard

  • No length limits are enforced for the data part