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]

Constructs a Bech32 struct if the result can be encoded as a bech32 string.

Constructs a Bech32 struct if the result can be encoded as a bech32 string. It uses data that is not range checked yet and as a result may return Err(Error::InvalidData).

This function currently allocates memory for the checked data part. See issue #19.

Returns the human readable part

Returns the data part as [u8] but only using 5 bits per byte

Destructures the Bech32 struct into its parts

Parses a Bech32 string but without enforcing the 90 character limit (for lightning BOLT 11).

Trait Implementations

impl PartialEq for Bech32
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Bech32
[src]

impl Debug for Bech32
[src]

Formats the value using the given formatter. Read more

impl Clone for Bech32
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialOrd for Bech32
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Bech32
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Hash for Bech32
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Bech32
[src]

Formats the value using the given formatter. Read more

impl FromStr for Bech32
[src]

The associated error which can be returned from parsing.

Decode from a string

Auto Trait Implementations

impl Send for Bech32

impl Sync for Bech32