Struct cml_chain_wasm::Rational
source · pub struct Rational(/* private fields */);
Implementations§
source§impl Rational
impl Rational
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<Rational, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<Rational, 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.
Trait Implementations§
source§impl FromWasmAbi for Rational
impl FromWasmAbi for Rational
source§impl IntoWasmAbi for Rational
impl IntoWasmAbi for Rational
source§impl OptionFromWasmAbi for Rational
impl OptionFromWasmAbi for Rational
source§impl OptionIntoWasmAbi for Rational
impl OptionIntoWasmAbi for Rational
source§impl RefFromWasmAbi for Rational
impl RefFromWasmAbi for Rational
source§impl RefMutFromWasmAbi for Rational
impl RefMutFromWasmAbi for Rational
Auto Trait Implementations§
impl RefUnwindSafe for Rational
impl Send for Rational
impl Sync for Rational
impl Unpin for Rational
impl UnwindSafe for Rational
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
.