Enum crypto_addr::BitcoinFormat
source · #[non_exhaustive]
pub enum BitcoinFormat {
Legacy,
P2SHWPKH,
}
Expand description
Bitcoin Address format type
Bitcoin public keys can generate addresses in differeent formats. Bitcoin is special among the
other AddressFormat
variants in that there is more the one way to format the public key. This
enum is used to specify which of the supported formats to use for Bitcoin addresses.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Legacy
Legacy P2PKH format
P2SHWPKH
Pay to script address that embeds a witness pay to public key. This is a segwit address type that looks familiar (as p2sh) to legacy clients.
Trait Implementations§
source§impl Clone for BitcoinFormat
impl Clone for BitcoinFormat
source§fn clone(&self) -> BitcoinFormat
fn clone(&self) -> BitcoinFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BitcoinFormat
impl Debug for BitcoinFormat
source§impl Default for BitcoinFormat
impl Default for BitcoinFormat
source§fn default() -> BitcoinFormat
fn default() -> BitcoinFormat
Returns the “default value” for a type. Read more
source§impl PartialEq<BitcoinFormat> for BitcoinFormat
impl PartialEq<BitcoinFormat> for BitcoinFormat
source§fn eq(&self, other: &BitcoinFormat) -> bool
fn eq(&self, other: &BitcoinFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.