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