pub struct TransactionUnspentOutput(/* private fields */);Implementations§
Source§impl TransactionUnspentOutput
impl TransactionUnspentOutput
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes.
- This type does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
Sourcepub fn from_cbor_bytes(
cbor_bytes: &[u8],
) -> Result<TransactionUnspentOutput, JsError>
pub fn from_cbor_bytes( cbor_bytes: &[u8], ) -> Result<TransactionUnspentOutput, 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 does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
Sourcepub fn from_cbor_hex(
cbor_bytes: &str,
) -> Result<TransactionUnspentOutput, JsError>
pub fn from_cbor_hex( cbor_bytes: &str, ) -> Result<TransactionUnspentOutput, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl TransactionUnspentOutput
impl TransactionUnspentOutput
pub fn new(input: &TransactionInput, output: &TransactionOutput) -> Self
pub fn input(&self) -> TransactionInput
pub fn output(&self) -> TransactionOutput
Trait Implementations§
Source§impl AsRef<TransactionUnspentOutput> for TransactionUnspentOutput
impl AsRef<TransactionUnspentOutput> for TransactionUnspentOutput
Source§fn as_ref(&self) -> &TransactionUnspentOutput
fn as_ref(&self) -> &TransactionUnspentOutput
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for TransactionUnspentOutput
impl Clone for TransactionUnspentOutput
Source§fn clone(&self) -> TransactionUnspentOutput
fn clone(&self) -> TransactionUnspentOutput
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 TransactionUnspentOutput
impl Debug for TransactionUnspentOutput
Source§impl From<TransactionUnspentOutput> for JsValue
impl From<TransactionUnspentOutput> for JsValue
Source§fn from(value: TransactionUnspentOutput) -> Self
fn from(value: TransactionUnspentOutput) -> Self
Converts to this type from the input type.
Source§impl From<TransactionUnspentOutput> for TransactionUnspentOutput
impl From<TransactionUnspentOutput> for TransactionUnspentOutput
Source§fn from(native: TransactionUnspentOutput) -> Self
fn from(native: TransactionUnspentOutput) -> Self
Converts to this type from the input type.
Source§impl Into<TransactionUnspentOutput> for TransactionUnspentOutput
impl Into<TransactionUnspentOutput> for TransactionUnspentOutput
Source§fn into(self) -> TransactionUnspentOutput
fn into(self) -> TransactionUnspentOutput
Converts this type into the (usually inferred) input type.
Source§impl RefFromWasmAbi for TransactionUnspentOutput
impl RefFromWasmAbi for TransactionUnspentOutput
Source§type Anchor = RcRef<TransactionUnspentOutput>
type Anchor = RcRef<TransactionUnspentOutput>
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 VectorFromWasmAbi for TransactionUnspentOutput
impl VectorFromWasmAbi for TransactionUnspentOutput
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[TransactionUnspentOutput]>
Source§impl VectorIntoJsValue for TransactionUnspentOutput
impl VectorIntoJsValue for TransactionUnspentOutput
fn vector_into_jsvalue(vector: Box<[TransactionUnspentOutput]>) -> JsValue
Source§impl VectorIntoWasmAbi for TransactionUnspentOutput
impl VectorIntoWasmAbi for TransactionUnspentOutput
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[TransactionUnspentOutput]>) -> Self::Abi
Source§impl WasmDescribeVector for TransactionUnspentOutput
impl WasmDescribeVector for TransactionUnspentOutput
impl SupportsConstructor for TransactionUnspentOutput
impl SupportsInstanceProperty for TransactionUnspentOutput
impl SupportsStaticProperty for TransactionUnspentOutput
Auto Trait Implementations§
impl Freeze for TransactionUnspentOutput
impl RefUnwindSafe for TransactionUnspentOutput
impl Send for TransactionUnspentOutput
impl Sync for TransactionUnspentOutput
impl Unpin for TransactionUnspentOutput
impl UnwindSafe for TransactionUnspentOutput
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::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.