Enum bitcoin::address::AddressType
source · #[non_exhaustive]pub enum AddressType {
P2pkh,
P2sh,
P2wpkh,
P2wsh,
P2tr,
}
Expand description
The different types of 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.
P2pkh
Pay to pubkey hash.
P2sh
Pay to script hash.
P2wpkh
Pay to witness pubkey hash.
P2wsh
Pay to witness script hash.
P2tr
Pay to taproot.
Trait Implementations§
source§impl Clone for AddressType
impl Clone for AddressType
source§fn clone(&self) -> AddressType
fn clone(&self) -> AddressType
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 AddressType
impl Debug for AddressType
source§impl Display for AddressType
impl Display for AddressType
source§impl FromStr for AddressType
impl FromStr for AddressType
source§impl Hash for AddressType
impl Hash for AddressType
source§impl Ord for AddressType
impl Ord for AddressType
source§fn cmp(&self, other: &AddressType) -> Ordering
fn cmp(&self, other: &AddressType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<AddressType> for AddressType
impl PartialEq<AddressType> for AddressType
source§fn eq(&self, other: &AddressType) -> bool
fn eq(&self, other: &AddressType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AddressType> for AddressType
impl PartialOrd<AddressType> for AddressType
source§fn partial_cmp(&self, other: &AddressType) -> Option<Ordering>
fn partial_cmp(&self, other: &AddressType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AddressType
impl Eq for AddressType
impl StructuralEq for AddressType
impl StructuralPartialEq for AddressType
Auto Trait Implementations§
impl RefUnwindSafe for AddressType
impl Send for AddressType
impl Sync for AddressType
impl Unpin for AddressType
impl UnwindSafe for AddressType
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