pub struct ConwayFormatTxOut(/* private fields */);Implementations§
Source§impl ConwayFormatTxOut
impl ConwayFormatTxOut
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 to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_canonical_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes using canonical CBOR encodings
Sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ConwayFormatTxOut, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ConwayFormatTxOut, 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 to_canonical_cbor_hex(&self) -> String
pub fn to_canonical_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes using canonical CBOR encodings as hex bytes
Sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<ConwayFormatTxOut, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<ConwayFormatTxOut, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl ConwayFormatTxOut
impl ConwayFormatTxOut
pub fn address(&self) -> Address
pub fn amount(&self) -> Value
pub fn set_datum_option(&mut self, datum_option: &DatumOption)
pub fn datum_option(&self) -> Option<DatumOption>
pub fn set_script_reference(&mut self, script_reference: &ScriptRef)
pub fn script_reference(&self) -> Option<ScriptRef>
pub fn new(address: &Address, amount: &Value) -> Self
Trait Implementations§
Source§impl AsRef<ConwayFormatTxOut> for ConwayFormatTxOut
impl AsRef<ConwayFormatTxOut> for ConwayFormatTxOut
Source§fn as_ref(&self) -> &ConwayFormatTxOut
fn as_ref(&self) -> &ConwayFormatTxOut
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for ConwayFormatTxOut
impl Clone for ConwayFormatTxOut
Source§fn clone(&self) -> ConwayFormatTxOut
fn clone(&self) -> ConwayFormatTxOut
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 ConwayFormatTxOut
impl Debug for ConwayFormatTxOut
Source§impl From<ConwayFormatTxOut> for ConwayFormatTxOut
impl From<ConwayFormatTxOut> for ConwayFormatTxOut
Source§fn from(native: ConwayFormatTxOut) -> Self
fn from(native: ConwayFormatTxOut) -> Self
Converts to this type from the input type.
Source§impl From<ConwayFormatTxOut> for JsValue
impl From<ConwayFormatTxOut> for JsValue
Source§fn from(value: ConwayFormatTxOut) -> Self
fn from(value: ConwayFormatTxOut) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for ConwayFormatTxOut
impl FromWasmAbi for ConwayFormatTxOut
Source§impl Into<ConwayFormatTxOut> for ConwayFormatTxOut
impl Into<ConwayFormatTxOut> for ConwayFormatTxOut
Source§fn into(self) -> ConwayFormatTxOut
fn into(self) -> ConwayFormatTxOut
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for ConwayFormatTxOut
impl IntoWasmAbi for ConwayFormatTxOut
Source§impl RefFromWasmAbi for ConwayFormatTxOut
impl RefFromWasmAbi for ConwayFormatTxOut
Source§type Anchor = RcRef<ConwayFormatTxOut>
type Anchor = RcRef<ConwayFormatTxOut>
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 TryFromJsValue for ConwayFormatTxOut
impl TryFromJsValue for ConwayFormatTxOut
Source§impl VectorFromWasmAbi for ConwayFormatTxOut
impl VectorFromWasmAbi for ConwayFormatTxOut
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[ConwayFormatTxOut]>
Source§impl VectorIntoJsValue for ConwayFormatTxOut
impl VectorIntoJsValue for ConwayFormatTxOut
fn vector_into_jsvalue(vector: Box<[ConwayFormatTxOut]>) -> JsValue
Source§impl VectorIntoWasmAbi for ConwayFormatTxOut
impl VectorIntoWasmAbi for ConwayFormatTxOut
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[ConwayFormatTxOut]>) -> Self::Abi
Source§impl WasmDescribeVector for ConwayFormatTxOut
impl WasmDescribeVector for ConwayFormatTxOut
impl SupportsConstructor for ConwayFormatTxOut
impl SupportsInstanceProperty for ConwayFormatTxOut
impl SupportsStaticProperty for ConwayFormatTxOut
Auto Trait Implementations§
impl Freeze for ConwayFormatTxOut
impl RefUnwindSafe for ConwayFormatTxOut
impl Send for ConwayFormatTxOut
impl Sync for ConwayFormatTxOut
impl Unpin for ConwayFormatTxOut
impl UnwindSafe for ConwayFormatTxOut
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.