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