#[repr(u8)]pub enum AddressType {
P2pkh = 0,
P2wpkh = 1,
P2tr = 2,
}Expand description
Address types supported by the standard.
Variants§
Implementations§
Source§impl AddressType
impl AddressType
Sourcepub fn to_address<C: Verification>(
&self,
secp: &Secp256k1<C>,
pubkey: &PublicKey,
network: Network,
) -> Address
pub fn to_address<C: Verification>( &self, secp: &Secp256k1<C>, pubkey: &PublicKey, network: Network, ) -> Address
Construct an address from address type and pubkey.
Trait Implementations§
Source§impl Clone for AddressType
impl Clone for AddressType
Source§fn clone(&self) -> AddressType
fn clone(&self) -> AddressType
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 AddressType
impl Debug for AddressType
Source§impl Hash for AddressType
impl Hash for AddressType
Source§impl PartialEq for AddressType
impl PartialEq for AddressType
impl Copy for AddressType
impl Eq for AddressType
impl StructuralPartialEq for AddressType
Auto Trait Implementations§
impl Freeze for AddressType
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