Struct cml_chain_wasm::byron::StakeDistribution
source · pub struct StakeDistribution(/* private fields */);Implementations§
source§impl StakeDistribution
impl StakeDistribution
sourcepub fn to_cbor_bytes(&self) -> Vec<u8>
pub fn to_cbor_bytes(&self) -> Vec<u8>
- Serialize this type to CBOR bytes.
- This type does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<StakeDistribution, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<StakeDistribution, 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 does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<StakeDistribution, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<StakeDistribution, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl StakeDistribution
impl StakeDistribution
pub fn new_single_key(stakeholder_id: &StakeholderId) -> Self
pub fn new_bootstrap_era() -> Self
pub fn kind(&self) -> StakeDistributionKind
pub fn as_single_key(&self) -> Option<StakeholderId>
Trait Implementations§
source§impl AsRef<StakeDistribution> for StakeDistribution
impl AsRef<StakeDistribution> for StakeDistribution
source§fn as_ref(&self) -> &StakeDistribution
fn as_ref(&self) -> &StakeDistribution
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for StakeDistribution
impl Clone for StakeDistribution
source§fn clone(&self) -> StakeDistribution
fn clone(&self) -> StakeDistribution
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 StakeDistribution
impl Debug for StakeDistribution
source§impl From<StakeDistribution> for JsValue
impl From<StakeDistribution> for JsValue
source§fn from(value: StakeDistribution) -> Self
fn from(value: StakeDistribution) -> Self
Converts to this type from the input type.
source§impl From<StakeDistribution> for StakeDistribution
impl From<StakeDistribution> for StakeDistribution
source§fn from(native: StakeDistribution) -> Self
fn from(native: StakeDistribution) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for StakeDistribution
impl FromWasmAbi for StakeDistribution
source§impl Into<StakeDistribution> for StakeDistribution
impl Into<StakeDistribution> for StakeDistribution
source§fn into(self) -> StakeDistribution
fn into(self) -> StakeDistribution
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for StakeDistribution
impl IntoWasmAbi for StakeDistribution
source§impl RefFromWasmAbi for StakeDistribution
impl RefFromWasmAbi for StakeDistribution
§type Anchor = Ref<'static, StakeDistribution>
type Anchor = Ref<'static, StakeDistribution>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Auto Trait Implementations§
impl Freeze for StakeDistribution
impl RefUnwindSafe for StakeDistribution
impl Send for StakeDistribution
impl Sync for StakeDistribution
impl Unpin for StakeDistribution
impl UnwindSafe for StakeDistribution
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§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.