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