Struct ckb_types::core::BlockBuilder[][src]

pub struct BlockBuilder { /* fields omitted */ }
Expand description

An advanced builder for BlockView.

Base on packed::BlockBuilder but added lots of syntactic sugar.

Implementations

Sets header.version.

Sets header.parent_hash.

Sets header.timestamp.

Sets header.number.

Sets header.transactions_root.

Sets header.proposals_hash.

Sets header.compact_target.

Sets header.extra_hash.

Sets header.epoch.

Sets header.dao.

Sets header.nonce.

Pushes an item into uncles.

Extends uncles with the contents of an iterator.

Sets uncles.

Pushes an item into transactions.

Extends transactions with the contents of an iterator.

Sets transactions.

Pushes an item into proposals.

Extends proposals with the contents of an iterator.

Sets proposals.

Set header.

Converts into BlockView and recalculates all hashes and merkle roots in the header.

Converts into BlockView but does not refresh all hashes and all merkle roots in the header.

Notice

BlockView created by this method could have invalid hashes or invalid merkle roots in the header.

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

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.