#[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
Data encoded by a P2PKH address.
Fields
§
pubkey_hash: PubkeyHashThe pubkey hash used to encumber outputs to this address.
P2sh
Data encoded by a P2SH address.
Fields
§
script_hash: ScriptHashThe script hash used to encumber outputs to this address.
Segwit
Data encoded by a Segwit address.
Fields
§
witness_program: WitnessProgramThe witness program used to encumber outputs to this address.
Trait Implementations§
Source§impl Clone for AddressData
impl Clone for AddressData
Source§fn clone(&self) -> AddressData
fn clone(&self) -> AddressData
Returns a duplicate 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 for AddressData
impl PartialEq for AddressData
Source§impl PartialOrd for AddressData
impl PartialOrd for AddressData
impl Eq for AddressData
impl StructuralPartialEq for AddressData
Auto Trait Implementations§
impl Freeze for AddressData
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