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 to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
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 to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
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 inner(&self) -> MapU64ToArrI64
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 duplicate 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 LongRefFromWasmAbi for CostModels
impl LongRefFromWasmAbi 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
Source§type Anchor = RcRef<CostModels>
type Anchor = RcRef<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
Source§impl TryFromJsValue for CostModels
impl TryFromJsValue for CostModels
Source§impl VectorFromWasmAbi for CostModels
impl VectorFromWasmAbi for CostModels
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CostModels]>
Source§impl VectorIntoJsValue for CostModels
impl VectorIntoJsValue for CostModels
fn vector_into_jsvalue(vector: Box<[CostModels]>) -> JsValue
Source§impl VectorIntoWasmAbi for CostModels
impl VectorIntoWasmAbi for CostModels
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CostModels]>) -> Self::Abi
Source§impl WasmDescribeVector for CostModels
impl WasmDescribeVector for CostModels
impl SupportsConstructor for CostModels
impl SupportsInstanceProperty for CostModels
impl SupportsStaticProperty for CostModels
Auto Trait Implementations§
impl Freeze for CostModels
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§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
.