pub struct Voter(/* private fields */);Implementations§
Source§impl Voter
impl Voter
pub fn key_hash(&self) -> Option<Ed25519KeyHash>
pub fn script_hash(&self) -> Option<ScriptHash>
Source§impl Voter
impl Voter
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
Sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Voter, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Voter, JsError>
- Create this type from CBOR bytes
Sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
Sourcepub fn to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
Source§impl Voter
impl Voter
pub fn new_constitutional_committee_hot_key_hash( ed25519_key_hash: &Ed25519KeyHash, ) -> Self
pub fn new_constitutional_committee_hot_script_hash( script_hash: &ScriptHash, ) -> Self
pub fn new_d_rep_key_hash(ed25519_key_hash: &Ed25519KeyHash) -> Self
pub fn new_d_rep_script_hash(script_hash: &ScriptHash) -> Self
pub fn new_staking_pool_key_hash(ed25519_key_hash: &Ed25519KeyHash) -> Self
pub fn kind(&self) -> VoterKind
pub fn as_constitutional_committee_hot_key_hash(&self) -> Option<Ed25519KeyHash>
pub fn as_constitutional_committee_hot_script_hash(&self) -> Option<ScriptHash>
pub fn as_d_rep_key_hash(&self) -> Option<Ed25519KeyHash>
pub fn as_d_rep_script_hash(&self) -> Option<ScriptHash>
pub fn as_staking_pool_key_hash(&self) -> Option<Ed25519KeyHash>
Trait Implementations§
Source§impl FromWasmAbi for Voter
impl FromWasmAbi for Voter
Source§impl IntoWasmAbi for Voter
impl IntoWasmAbi for Voter
Source§impl LongRefFromWasmAbi for Voter
impl LongRefFromWasmAbi for Voter
Source§impl OptionFromWasmAbi for Voter
impl OptionFromWasmAbi for Voter
Source§impl OptionIntoWasmAbi for Voter
impl OptionIntoWasmAbi for Voter
Source§impl RefFromWasmAbi for Voter
impl RefFromWasmAbi for Voter
Source§impl RefMutFromWasmAbi for Voter
impl RefMutFromWasmAbi for Voter
Source§impl TryFromJsValue for Voter
impl TryFromJsValue for Voter
Source§impl VectorFromWasmAbi for Voter
impl VectorFromWasmAbi for Voter
Source§impl VectorIntoWasmAbi for Voter
impl VectorIntoWasmAbi for Voter
impl SupportsConstructor for Voter
impl SupportsInstanceProperty for Voter
impl SupportsStaticProperty for Voter
Auto Trait Implementations§
impl Freeze for Voter
impl RefUnwindSafe for Voter
impl Send for Voter
impl Sync for Voter
impl Unpin for Voter
impl UnwindSafe for Voter
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 moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.