pub struct Outpoint<M> where
    M: MarkedDigestOutput
{ pub txid: M, pub idx: u32, }
Expand description

An Outpoint. This is a unique identifier for a UTXO, and is composed of a transaction ID (in Bitcoin-style LE format), and the index of the output being spent within that transactions output vectour (vout).

Outpoint::null() and Outpoint::default() return the null Outpoint, which references a txid of all 0, and a index 0xffff_ffff. This null outpoint is used in every coinbase transaction.

Fields

txid: M

The txid that created the UTXO being pointed to.

idx: u32

The index of that UTXO in the transaction’s output vector.

Implementations

Returns a new Outpoint from a digest and index

Returns the default, or null Outpoint. This is used in the coinbase input.

Return the BE txid as hex, suitable for block explorers

Instantiate an outpoint from the Block Explorer (big-endian) TXID format and integer index

Trait Implementations

An associated error type

Returns the byte-length of the serialized data structure.

Deserializes an instance of Self from a std::io::Read. The limit argument is used only when deserializing collections, and specifies a maximum number of instances of the underlying type to read. Read more

Serializes self to a std::io::Write. Following Write trait conventions, its Ok type must be a usize denoting the number of bytes written. Read more

Read a sequence of exactly limit objects from the reader.

Write a sequence of ByteFormat objects to a writer. The iter argument may be any object that implements IntoIterator<Item = &Item>. This means we can seamlessly use vectors, slices, etc. Read more

Decodes a hex string to a Vec<u8>, deserializes an instance of Self from that vector.

Serialize self to a base64 string, using standard RFC4648 non-url safe characters

Serializes self to a vector, returns the hex-encoded vector

Serialize self to a base64 string, using standard RFC4648 non-url safe characters

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.