Struct utxo::Output

source · []
pub struct Output<D> {
    pub value: u64,
    pub data: Option<D>,
}
Expand description

Output without native assets (e.g. Bitcoin)

The algorithm of selection always chooses the largest output. It is expected to use fewer outputs.

Fields

value: u64

Coin value.

data: Option<D>

Optional data such as transaction hash, index and any other data needed later. The output should be able to make a transaction input after selection.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Creates zero value of the UTxO type.

Computes self + rhs, returning None if overflow occurred.

Computes self - rhs, returning None if overflow occurred.

Computes self - rhs, saturating at the lowest bound if overflow occurred.

Compares two UTxOs to see which is better for the output, the less the better. A good strategy of UTxO selection should: 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.

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.