pub struct Bech32Address { /* private fields */ }Expand description
An address with its network type (bech32 human-readable part).
Implementations§
Methods from Deref<Target = Address>§
Sourcepub fn is_ed25519(&self) -> bool
pub fn is_ed25519(&self) -> bool
Checks whether the address is an Ed25519Address.
Sourcepub fn as_ed25519(&self) -> &Ed25519Address
pub fn as_ed25519(&self) -> &Ed25519Address
Gets the address as an actual Ed25519Address.
PANIC: do not call on a non-ed25519 address.
Sourcepub fn is_alias(&self) -> bool
pub fn is_alias(&self) -> bool
Checks whether the address is an AliasAddress.
Sourcepub fn as_alias(&self) -> &AliasAddress
pub fn as_alias(&self) -> &AliasAddress
Gets the address as an actual AliasAddress.
PANIC: do not call on a non-alias address.
Sourcepub fn is_nft(&self) -> bool
pub fn is_nft(&self) -> bool
Checks whether the address is an NftAddress.
Sourcepub fn as_nft(&self) -> &NftAddress
pub fn as_nft(&self) -> &NftAddress
Gets the address as an actual NftAddress.
PANIC: do not call on a non-nft address.
Trait Implementations§
Source§impl AsRef<Address> for Bech32Address
impl AsRef<Address> for Bech32Address
Source§impl Clone for Bech32Address
impl Clone for Bech32Address
Source§fn clone(&self) -> Bech32Address
fn clone(&self) -> Bech32Address
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 Bech32Address
impl Debug for Bech32Address
Source§impl Deref for Bech32Address
impl Deref for Bech32Address
Source§impl Display for Bech32Address
impl Display for Bech32Address
Source§impl FromStr for Bech32Address
impl FromStr for Bech32Address
Source§impl Hash for Bech32Address
impl Hash for Bech32Address
Source§impl Ord for Bech32Address
impl Ord for Bech32Address
Source§fn cmp(&self, other: &Bech32Address) -> Ordering
fn cmp(&self, other: &Bech32Address) -> 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<&str> for Bech32Address
impl PartialEq<&str> for Bech32Address
Source§impl PartialEq<String> for Bech32Address
impl PartialEq<String> for Bech32Address
Source§impl PartialEq<str> for Bech32Address
impl PartialEq<str> for Bech32Address
Source§impl PartialEq for Bech32Address
impl PartialEq for Bech32Address
Source§impl PartialOrd for Bech32Address
impl PartialOrd for Bech32Address
impl Copy for Bech32Address
impl Eq for Bech32Address
impl StructuralPartialEq for Bech32Address
Auto Trait Implementations§
impl Freeze for Bech32Address
impl RefUnwindSafe for Bech32Address
impl Send for Bech32Address
impl Sync for Bech32Address
impl Unpin for Bech32Address
impl UnwindSafe for Bech32Address
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.Source§impl<T> ToBech32Ext for T
impl<T> ToBech32Ext for T
Source§fn try_to_bech32(self, hrp: impl AsRef<str>) -> Result<Bech32Address, Error>
fn try_to_bech32(self, hrp: impl AsRef<str>) -> Result<Bech32Address, Error>
Try to encode this address to a bech32 string with the given Human
Readable Part as prefix.
Source§fn to_bech32(self, hrp: Hrp) -> Bech32Address
fn to_bech32(self, hrp: Hrp) -> Bech32Address
Encodes this address to a bech32 string with the given Human Readable
Part as prefix.
Source§fn to_bech32_unchecked(self, hrp: impl AsRef<str>) -> Bech32Address
fn to_bech32_unchecked(self, hrp: impl AsRef<str>) -> Bech32Address
Encodes this address to a bech32 string with the given Human Readable
Part as prefix without checking validity.