Enum bitcoin::address::AddressData
source · #[non_exhaustive]pub enum AddressData {
P2pkh {
pubkey_hash: PubkeyHash,
},
P2sh {
script_hash: ScriptHash,
},
Segwit {
witness_program: WitnessProgram,
},
}
Expand description
The data encoded by an Address
.
This is the data used to encumber an output that pays to this address i.e., it is the address excluding the network information.
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
Fields
§
pubkey_hash: PubkeyHash
The pubkey hash used to encumber outputs to this address.
Data encoded by a P2PKH address.
P2sh
Fields
§
script_hash: ScriptHash
The script hash used to encumber outputs to this address.
Data encoded by a P2SH address.
Segwit
Fields
§
witness_program: WitnessProgram
The witness program used to encumber outputs to this address.
Data encoded by a Segwit address.
Trait Implementations§
source§impl Clone for AddressData
impl Clone for AddressData
source§fn clone(&self) -> AddressData
fn clone(&self) -> AddressData
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 AddressData
impl Debug for AddressData
source§impl Hash for AddressData
impl Hash for AddressData
source§impl Ord for AddressData
impl Ord for AddressData
source§fn cmp(&self, other: &AddressData) -> Ordering
fn cmp(&self, other: &AddressData) -> 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<AddressData> for AddressData
impl PartialEq<AddressData> for AddressData
source§fn eq(&self, other: &AddressData) -> bool
fn eq(&self, other: &AddressData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AddressData> for AddressData
impl PartialOrd<AddressData> for AddressData
source§fn partial_cmp(&self, other: &AddressData) -> Option<Ordering>
fn partial_cmp(&self, other: &AddressData) -> 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 Eq for AddressData
impl StructuralEq for AddressData
impl StructuralPartialEq for AddressData
Auto Trait Implementations§
impl RefUnwindSafe for AddressData
impl Send for AddressData
impl Sync for AddressData
impl Unpin for AddressData
impl UnwindSafe for AddressData
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