pub struct ShelleyAddress(/* private fields */);Expand description
A decoded Shelley address
Implementations§
Source§impl ShelleyAddress
impl ShelleyAddress
pub fn new( network: Network, payment: ShelleyPaymentPart, delegation: ShelleyDelegationPart, ) -> ShelleyAddress
pub fn to_header(&self) -> u8
pub fn payment(&self) -> &ShelleyPaymentPart
pub fn delegation(&self) -> &ShelleyDelegationPart
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
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn to_hex(&self) -> String
pub fn to_bech32(&self) -> Result<String, Error>
Sourcepub fn has_script(&self) -> bool
pub fn has_script(&self) -> bool
Indicates if either the payment or delegation part is a script
Trait Implementations§
Source§impl Clone for ShelleyAddress
impl Clone for ShelleyAddress
Source§fn clone(&self) -> ShelleyAddress
fn clone(&self) -> ShelleyAddress
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 ShelleyAddress
impl Debug for ShelleyAddress
Source§impl From<ShelleyAddress> for Address
impl From<ShelleyAddress> for Address
Source§fn from(addr: ShelleyAddress) -> Address
fn from(addr: ShelleyAddress) -> Address
Converts to this type from the input type.
Source§impl Hash for ShelleyAddress
impl Hash for ShelleyAddress
Source§impl PartialEq for ShelleyAddress
impl PartialEq for ShelleyAddress
Source§impl PartialOrd for ShelleyAddress
impl PartialOrd for ShelleyAddress
Source§impl TryFrom<ShelleyAddress> for StakeAddress
impl TryFrom<ShelleyAddress> for StakeAddress
Source§fn try_from(
value: ShelleyAddress,
) -> Result<StakeAddress, <StakeAddress as TryFrom<ShelleyAddress>>::Error>
fn try_from( value: ShelleyAddress, ) -> Result<StakeAddress, <StakeAddress as TryFrom<ShelleyAddress>>::Error>
Performs the conversion.
impl Eq for ShelleyAddress
impl StructuralPartialEq for ShelleyAddress
Auto Trait Implementations§
impl Freeze for ShelleyAddress
impl RefUnwindSafe for ShelleyAddress
impl Send for ShelleyAddress
impl Sync for ShelleyAddress
impl Unpin for ShelleyAddress
impl UnsafeUnpin for ShelleyAddress
impl UnwindSafe for ShelleyAddress
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more