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