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