pub struct Address {
    pub payload: AddressPayload,
    pub network: AddressNetwork,
}Fields§
§payload: AddressPayloadAddress payload (see AddressPayload).
network: AddressNetworkA type of the network used by the address
Implementations§
source§impl Address
 
impl Address
pub fn new(payload: AddressPayload, network: AddressNetwork) -> Address
sourcepub fn with(
    script: &ScriptPubkey,
    network: impl Into<AddressNetwork>
) -> Result<Address, AddressError>
 
pub fn with( script: &ScriptPubkey, network: impl Into<AddressNetwork> ) -> Result<Address, AddressError>
Constructs compatible address for a given scriptPubkey.
Returns None if the uncompressed key is provided or scriptPubkey
can’t be represented as an address.
sourcepub fn script_pubkey(self) -> ScriptPubkey
 
pub fn script_pubkey(self) -> ScriptPubkey
Returns script corresponding to the given address.
sourcepub fn is_testnet(self) -> bool
 
pub fn is_testnet(self) -> bool
Returns if the address is testnet-, signet- or regtest-specific
Trait Implementations§
source§impl Ord for Address
 
impl Ord for Address
source§impl PartialEq for Address
 
impl PartialEq for Address
source§impl PartialOrd for Address
 
impl PartialOrd for Address
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 Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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
source§impl<Q, K> Comparable<K> for Q
 
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.