Struct cml_chain_wasm::governance::ParameterChangeAction
source · pub struct ParameterChangeAction(/* private fields */);Implementations§
source§impl ParameterChangeAction
impl ParameterChangeAction
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<ParameterChangeAction, JsError>
pub fn from_cbor_bytes( cbor_bytes: &[u8] ) -> Result<ParameterChangeAction, 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 from_cbor_hex(cbor_bytes: &str) -> Result<ParameterChangeAction, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<ParameterChangeAction, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl ParameterChangeAction
impl ParameterChangeAction
pub fn gov_action_id(&self) -> Option<GovActionId>
pub fn protocol_param_update(&self) -> ProtocolParamUpdate
pub fn new( gov_action_id: Option<GovActionId>, protocol_param_update: &ProtocolParamUpdate ) -> Self
Trait Implementations§
source§impl AsRef<ParameterChangeAction> for ParameterChangeAction
impl AsRef<ParameterChangeAction> for ParameterChangeAction
source§fn as_ref(&self) -> &ParameterChangeAction
fn as_ref(&self) -> &ParameterChangeAction
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for ParameterChangeAction
impl Clone for ParameterChangeAction
source§fn clone(&self) -> ParameterChangeAction
fn clone(&self) -> ParameterChangeAction
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 ParameterChangeAction
impl Debug for ParameterChangeAction
source§impl From<ParameterChangeAction> for JsValue
impl From<ParameterChangeAction> for JsValue
source§fn from(value: ParameterChangeAction) -> Self
fn from(value: ParameterChangeAction) -> Self
Converts to this type from the input type.
source§impl From<ParameterChangeAction> for ParameterChangeAction
impl From<ParameterChangeAction> for ParameterChangeAction
source§fn from(native: ParameterChangeAction) -> Self
fn from(native: ParameterChangeAction) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for ParameterChangeAction
impl FromWasmAbi for ParameterChangeAction
source§impl Into<ParameterChangeAction> for ParameterChangeAction
impl Into<ParameterChangeAction> for ParameterChangeAction
source§fn into(self) -> ParameterChangeAction
fn into(self) -> ParameterChangeAction
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for ParameterChangeAction
impl IntoWasmAbi for ParameterChangeAction
source§impl RefFromWasmAbi for ParameterChangeAction
impl RefFromWasmAbi for ParameterChangeAction
§type Anchor = Ref<'static, ParameterChangeAction>
type Anchor = Ref<'static, ParameterChangeAction>
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 ParameterChangeAction
impl RefUnwindSafe for ParameterChangeAction
impl Send for ParameterChangeAction
impl Sync for ParameterChangeAction
impl Unpin for ParameterChangeAction
impl UnwindSafe for ParameterChangeAction
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.