Enum pallas_addresses::Address
source · pub enum Address {
Byron(ByronAddress),
Shelley(ShelleyAddress),
Stake(StakeAddress),
}
Expand description
A decoded Cardano address of any type
Variants§
Implementations§
source§impl Address
impl Address
sourcepub fn to_bech32(&self) -> Result<String, Error>
pub fn to_bech32(&self) -> Result<String, Error>
Tries to encode an Address into a bech32 string
sourcepub fn from_bech32(bech32: &str) -> Result<Self, Error>
pub fn from_bech32(bech32: &str) -> Result<Self, Error>
Tries to parse a bech32 value into an Address
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_hex(bytes: &str) -> Result<Self, Error>
sourcepub fn hrp(&self) -> Result<&'static str, Error>
pub fn hrp(&self) -> Result<&'static str, Error>
Gets the bech32 human-readable-part for this address
sourcepub fn has_script(&self) -> bool
pub fn has_script(&self) -> bool
Indicates if this is address includes a script hash
sourcepub fn is_enterprise(&self) -> bool
pub fn is_enterprise(&self) -> bool
Indicates if this is an enterpise address
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn to_hex(&self) -> String
Trait Implementations§
source§impl From<ByronAddress> for Address
impl From<ByronAddress> for Address
source§fn from(addr: ByronAddress) -> Self
fn from(addr: ByronAddress) -> Self
Converts to this type from the input type.
source§impl From<ShelleyAddress> for Address
impl From<ShelleyAddress> for Address
source§fn from(addr: ShelleyAddress) -> Self
fn from(addr: ShelleyAddress) -> Self
Converts to this type from the input type.
source§impl From<StakeAddress> for Address
impl From<StakeAddress> for Address
source§fn from(addr: StakeAddress) -> Self
fn from(addr: StakeAddress) -> Self
Converts to this type from the input type.
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 Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
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