pub enum ShelleyDelegationPart {
Key(Hash<28>),
Script(Hash<28>),
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>) -> ShelleyDelegationPart
pub fn script_hash(hash: Hash<28>) -> ShelleyDelegationPart
pub fn from_pointer(bytes: &[u8]) -> Result<ShelleyDelegationPart, 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 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 ShelleyDelegationPart
impl Debug for ShelleyDelegationPart
Source§impl Hash for ShelleyDelegationPart
impl Hash for ShelleyDelegationPart
Source§impl PartialEq for ShelleyDelegationPart
impl PartialEq for ShelleyDelegationPart
Source§impl PartialOrd for ShelleyDelegationPart
impl PartialOrd for ShelleyDelegationPart
impl Eq for ShelleyDelegationPart
impl StructuralPartialEq for ShelleyDelegationPart
Auto Trait Implementations§
impl Freeze for ShelleyDelegationPart
impl RefUnwindSafe for ShelleyDelegationPart
impl Send for ShelleyDelegationPart
impl Sync for ShelleyDelegationPart
impl Unpin for ShelleyDelegationPart
impl UnsafeUnpin 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
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