pub struct Address(/* private fields */);Expand description
A bitcoin address
Implementations§
Source§impl Address
impl Address
Sourcepub fn new(address: String, network: Network) -> Result<Self, AddressParseError>
pub fn new(address: String, network: Network) -> Result<Self, AddressParseError>
Parse a string as an address for the given network.
Sourcepub fn from_script(
script: Arc<Script>,
network: Network,
) -> Result<Self, FromScriptError>
pub fn from_script( script: Arc<Script>, network: Network, ) -> Result<Self, FromScriptError>
Parse a script as an address for the given network
Sourcepub fn script_pubkey(&self) -> Arc<Script>
pub fn script_pubkey(&self) -> Arc<Script>
Return the scriptPubKey underlying an address.
Sourcepub fn is_valid_for_network(&self, network: Network) -> bool
pub fn is_valid_for_network(&self, network: Network) -> bool
Is the address valid for the provided network
Sourcepub fn to_address_data(&self) -> AddressData
pub fn to_address_data(&self) -> AddressData
Return the data for the address.
Trait Implementations§
Source§impl<UT> LowerError<UT> for Address
impl<UT> LowerError<UT> for Address
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for Address
impl<UT> LowerReturn<UT> for Address
Source§type ReturnType = <Arc<Address> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Address> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more