pub enum ShelleyDelegationPart {
Key(StakeKeyHash),
Script(ScriptHash),
Pointer(Pointer),
Null,
}
Expand description
The delegation part of a Shelley address
Variants§
Implementations§
source§impl ShelleyDelegationPart
impl ShelleyDelegationPart
pub fn key_hash(hash: Hash<28>) -> Self
pub fn script_hash(hash: Hash<28>) -> Self
pub fn from_pointer(bytes: &[u8]) -> Result<Self, Error>
sourcepub fn as_hash(&self) -> Option<&Hash<28>>
pub fn as_hash(&self) -> Option<&Hash<28>>
Get a reference to the inner hash of this address part
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn to_hex(&self) -> String
pub fn to_bech32(&self) -> Result<String, Error>
pub fn is_script(&self) -> bool
Trait Implementations§
source§impl Clone for ShelleyDelegationPart
impl Clone for ShelleyDelegationPart
source§fn clone(&self) -> ShelleyDelegationPart
fn clone(&self) -> ShelleyDelegationPart
Returns a copy 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 ShelleyDelegationPart
impl Debug for ShelleyDelegationPart
source§impl Hash for ShelleyDelegationPart
impl Hash for ShelleyDelegationPart
source§impl PartialEq for ShelleyDelegationPart
impl PartialEq for ShelleyDelegationPart
source§fn eq(&self, other: &ShelleyDelegationPart) -> bool
fn eq(&self, other: &ShelleyDelegationPart) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ShelleyDelegationPart
impl PartialOrd for ShelleyDelegationPart
source§fn partial_cmp(&self, other: &ShelleyDelegationPart) -> Option<Ordering>
fn partial_cmp(&self, other: &ShelleyDelegationPart) -> Option<Ordering>
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 ShelleyDelegationPart
impl StructuralPartialEq for ShelleyDelegationPart
Auto Trait Implementations§
impl RefUnwindSafe for ShelleyDelegationPart
impl Send for ShelleyDelegationPart
impl Sync for ShelleyDelegationPart
impl Unpin for ShelleyDelegationPart
impl UnwindSafe for ShelleyDelegationPart
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