pub enum BlockData {
    FullBlock(Block),
    HeaderOnly(BlockHeader),
}
Expand description

A block including either all its transactions or only the block header.

BlockSource may be implemented to either always return full blocks or, in the case of compact block filters (BIP 157/158), return header-only blocks when no pertinent transactions match. See chain::Filter for details on how to notify a source of such transactions.

Variants§

§

FullBlock(Block)

A block containing all its transactions.

§

HeaderOnly(BlockHeader)

A block header for when the block does not contain any pertinent transactions.

Trait Implementations§

The validated data wrapper which can be dereferenced to obtain the validated data.
Validates the chain data against the given block hash and any criteria needed to ensure that it is internally consistent. 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 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.