pub struct TxOut {
pub amount: Amount,
pub script_pubkey: ScriptPubKeyBuf,
}Expand description
Bitcoin transaction output.
Defines new coins to be created as a result of the transaction, along with spending conditions (“script”, aka “output script”), which an input spending it must satisfy.
An output that is not yet spent by an input is called Unspent Transaction Output (“UTXO”).
§Bitcoin Core References
Fields§
§amount: AmountThe value of the output.
script_pubkey: ScriptPubKeyBufThe script which must be satisfied for the output to be spent.
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for TxOut
Available on crate features arbitrary and alloc only.
impl<'a> Arbitrary<'a> for TxOut
Available on crate features
arbitrary and alloc only.Source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl Encodable for TxOut
Available on crate feature alloc only.
impl Encodable for TxOut
Available on crate feature
alloc only.Source§type Encoder<'e> = Encoder2<AmountEncoder<'e>, ScriptEncoder<'e>>
where
Self: 'e
type Encoder<'e> = Encoder2<AmountEncoder<'e>, ScriptEncoder<'e>> where Self: 'e
The encoder associated with this type. Conceptually, the encoder is like
an iterator which yields byte slices.
Source§impl Ord for TxOut
impl Ord for TxOut
Source§impl PartialOrd for TxOut
impl PartialOrd for TxOut
impl Eq for TxOut
impl StructuralPartialEq for TxOut
Auto Trait Implementations§
impl Freeze for TxOut
impl RefUnwindSafe for TxOut
impl Send for TxOut
impl Sync for TxOut
impl Unpin for TxOut
impl UnsafeUnpin for TxOut
impl UnwindSafe for TxOut
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