Trait breez_sdk_core::bitcoin::bech32::CheckBase32

pub trait CheckBase32<T>
where T: AsRef<[u5]>,
{ type Err; // Required method fn check_base32(self) -> Result<T, Self::Err>; }
Expand description

A trait to convert between u8 arrays and u5 arrays without changing the content of the elements, but checking that they are in range.

Required Associated Types§

type Err

Error type if conversion fails

Required Methods§

fn check_base32(self) -> Result<T, Self::Err>

Check if all values are in range and return array-like struct of u5 values

Implementors§

§

impl<T> CheckBase32<Vec<u5>> for T
where T: AsRef<[u8]>,

§

type Err = Error