Struct cml_chain_wasm::governance::GovAction
source · pub struct GovAction(/* private fields */);Implementations§
source§impl GovAction
impl GovAction
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 from_cbor_bytes(cbor_bytes: &[u8]) -> Result<GovAction, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<GovAction, 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.
source§impl GovAction
impl GovAction
pub fn new_parameter_change_action( gov_action_id: Option<GovActionId>, protocol_param_update: &ProtocolParamUpdate ) -> Self
pub fn new_hard_fork_initiation_action( action_id: Option<GovActionId>, version: &ProtocolVersion ) -> Self
pub fn new_treasury_withdrawals_action( withdrawal: &MapRewardAccountToCoin ) -> Self
pub fn new_no_confidence(action_id: Option<GovActionId>) -> Self
pub fn new_new_committee( action_id: Option<GovActionId>, cold_credentials: &CommitteeColdCredentialList, committee: &Committee ) -> Self
pub fn new_new_constitution( action_id: Option<GovActionId>, constitution: &Constitution ) -> Self
pub fn new_info_action() -> Self
pub fn kind(&self) -> GovActionKind
pub fn as_parameter_change_action(&self) -> Option<ParameterChangeAction>
pub fn as_hard_fork_initiation_action(&self) -> Option<HardForkInitiationAction>
pub fn as_treasury_withdrawals_action( &self ) -> Option<TreasuryWithdrawalsAction>
pub fn as_no_confidence(&self) -> Option<NoConfidence>
pub fn as_new_committee(&self) -> Option<NewCommittee>
pub fn as_new_constitution(&self) -> Option<NewConstitution>
Trait Implementations§
source§impl FromWasmAbi for GovAction
impl FromWasmAbi for GovAction
source§impl IntoWasmAbi for GovAction
impl IntoWasmAbi for GovAction
source§impl OptionFromWasmAbi for GovAction
impl OptionFromWasmAbi for GovAction
source§impl OptionIntoWasmAbi for GovAction
impl OptionIntoWasmAbi for GovAction
source§impl RefFromWasmAbi for GovAction
impl RefFromWasmAbi for GovAction
source§impl RefMutFromWasmAbi for GovAction
impl RefMutFromWasmAbi for GovAction
Auto Trait Implementations§
impl Freeze for GovAction
impl RefUnwindSafe for GovAction
impl Send for GovAction
impl Sync for GovAction
impl Unpin for GovAction
impl UnwindSafe for GovAction
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.