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