#[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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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 for BitcoinFormat
impl PartialEq for BitcoinFormat
impl Eq for BitcoinFormat
impl StructuralPartialEq for BitcoinFormat
Auto Trait Implementations§
impl Freeze for BitcoinFormat
impl RefUnwindSafe for BitcoinFormat
impl Send for BitcoinFormat
impl Sync for BitcoinFormat
impl Unpin for BitcoinFormat
impl UnwindSafe for BitcoinFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more