[][src]Trait lnpbp::rgb::bech32::FromBech32

pub trait FromBech32 where
    Self: Sized
{ fn from_bech32(bech32: Bech32) -> Result<Self, Error>; fn from_bech32_str(s: &str) -> Result<Self, Error> { ... } }

Trait for types that can be reconstructed from Bech32-encoded data tagged with specific HRP

Required methods

fn from_bech32(bech32: Bech32) -> Result<Self, Error>

Unwraps Bech32 enum data into a concrete type, if any, or fails with Error::WrongType otherwise

Loading content...

Provided methods

fn from_bech32_str(s: &str) -> Result<Self, Error>

Tries to read Bech32-encoded data from s argument, checks it's type and constructs object if HRP corresponds to the type implementing this trait. Fails with [Error] type

Loading content...

Implementors

impl<T> FromBech32 for T where
    T: TryFrom<Bech32, Error = Error>, 
[src]

Loading content...