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