Skip to main content

OutputView

Trait OutputView 

Source
pub trait OutputView: Debug {
    // Required methods
    fn value(&self) -> Zatoshis;
    fn script_pubkey(&self) -> &Script;

    // Provided method
    fn serialized_size(&self) -> usize { ... }
}
Expand description

This trait provides a minimized view of a transparent output suitable for use in fee and change computation.

Required Methods§

Source

fn value(&self) -> Zatoshis

Returns the value of the output being created.

Source

fn script_pubkey(&self) -> &Script

Returns the script corresponding to the newly created output.

Provided Methods§

Source

fn serialized_size(&self) -> usize

Returns the serialized size of the txout.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl OutputView for TxOut<Zatoshis>

Source§

fn value(&self) -> Zatoshis

Source§

fn script_pubkey(&self) -> &Script

Implementors§