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