Trait Sigops

Source
pub trait Sigops {
    // Required method
    fn scripts(&self) -> impl Iterator<Item = &[u8]>;

    // Provided method
    fn sigops(&self) -> Result<u32, Error> { ... }
}
Expand description

Trait for counting the number of transparent signature operations in the transparent inputs and outputs of a transaction.

Required Methods§

Source

fn scripts(&self) -> impl Iterator<Item = &[u8]>

Returns an iterator over the input and output scripts in the transaction.

The number of input scripts in a coinbase tx is zero.

Provided Methods§

Source

fn sigops(&self) -> Result<u32, Error>

Returns the number of transparent signature operations in the transparent inputs and outputs of the given transaction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Sigops for Transaction

Source§

fn scripts(&self) -> impl Iterator<Item = &[u8]>

Source§

impl Sigops for Transaction

Source§

fn scripts(&self) -> impl Iterator<Item = &[u8]>

Source§

impl Sigops for UnminedTx

Source§

fn scripts(&self) -> impl Iterator<Item = &[u8]>

Implementors§