pub trait ToBech32 {
// Required methods
fn to_bech32(&self, hrp: &str) -> String;
fn try_to_bech32(
&self,
hrp: &str,
expected_hrp: Option<&str>,
) -> Result<String, Bech32Error>;
}Required Methods§
Sourcefn try_to_bech32(
&self,
hrp: &str,
expected_hrp: Option<&str>,
) -> Result<String, Bech32Error>
fn try_to_bech32( &self, hrp: &str, expected_hrp: Option<&str>, ) -> Result<String, Bech32Error>
Fallibly encode secret bytes as Bech32 with the specified HRP and optional expected HRP validation.