Struct bech32::Bech32
[−]
[src]
pub struct Bech32 { /* fields omitted */ }
Grouping structure for the human-readable part and the data part of decoded Bech32 string.
Methods
impl Bech32
[src]
pub fn new(hrp: String, data: Vec<u8>) -> Result<Bech32, Error>
[src]
Constructs a Bech32
struct if the result can be encoded as a bech32 string.
pub fn hrp(&self) -> &str
[src]
Returns the human readable part
pub fn data(&self) -> &[u8]
[src]
Returns the data part as [u8]
but only using 5 bits per byte
pub fn into_parts(self) -> (String, Vec<u8>)
[src]
Destructures the Bech32
struct into its parts
Trait Implementations
impl PartialEq for Bech32
[src]
fn eq(&self, __arg_0: &Bech32) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Bech32) -> bool
[src]
This method tests for !=
.
impl Debug for Bech32
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Bech32
[src]
fn clone(&self) -> Bech32
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Display for Bech32
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more