[−][src]Struct ckb_types::core::BlockBuilder
An advanced builder for BlockView
.
Base on packed::BlockBuilder
but added lots of syntactic sugar.
Implementations
impl BlockBuilder
[src]
pub fn version(self, v: Uint32) -> Self
[src]
Sets header.version
.
pub fn parent_hash(self, v: Byte32) -> Self
[src]
Sets header.parent_hash
.
pub fn timestamp(self, v: Uint64) -> Self
[src]
Sets header.timestamp
.
pub fn number(self, v: Uint64) -> Self
[src]
Sets header.number
.
pub fn transactions_root(self, v: Byte32) -> Self
[src]
Sets header.transactions_root
.
pub fn proposals_hash(self, v: Byte32) -> Self
[src]
Sets header.proposals_hash
.
pub fn compact_target(self, v: Uint32) -> Self
[src]
Sets header.compact_target
.
pub fn uncles_hash(self, v: Byte32) -> Self
[src]
Sets header.uncles_hash
.
pub fn epoch(self, v: Uint64) -> Self
[src]
Sets header.epoch
.
pub fn dao(self, v: Byte32) -> Self
[src]
Sets header.dao
.
pub fn nonce(self, v: Uint128) -> Self
[src]
Sets header.nonce
.
pub fn uncle(self, v: UncleBlockView) -> Self
[src]
Pushes an item into uncles
.
pub fn uncles<T>(self, v: T) -> Self where
T: IntoIterator<Item = UncleBlockView>,
[src]
T: IntoIterator<Item = UncleBlockView>,
Extends uncles
with the contents of an iterator.
pub fn set_uncles(self, v: Vec<UncleBlockView>) -> Self
[src]
Sets uncles
.
pub fn transaction(self, v: TransactionView) -> Self
[src]
Pushes an item into transactions
.
pub fn transactions<T>(self, v: T) -> Self where
T: IntoIterator<Item = TransactionView>,
[src]
T: IntoIterator<Item = TransactionView>,
Extends transactions
with the contents of an iterator.
pub fn set_transactions(self, v: Vec<TransactionView>) -> Self
[src]
Sets transactions
.
pub fn proposal(self, v: ProposalShortId) -> Self
[src]
Pushes an item into proposals
.
pub fn proposals<T>(self, v: T) -> Self where
T: IntoIterator<Item = ProposalShortId>,
[src]
T: IntoIterator<Item = ProposalShortId>,
Extends proposals
with the contents of an iterator.
pub fn set_proposals(self, v: Vec<ProposalShortId>) -> Self
[src]
Sets proposals
.
pub fn header(self, header: HeaderView) -> Self
[src]
Set header
.
pub fn build(self) -> BlockView
[src]
Converts into BlockView
and recalculates all hashes and merkle
roots in the header.
pub fn build_unchecked(self) -> BlockView
[src]
Trait Implementations
impl Clone for BlockBuilder
[src]
fn clone(&self) -> BlockBuilder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BlockBuilder
[src]
impl Default for BlockBuilder
[src]
fn default() -> BlockBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for BlockBuilder
impl Send for BlockBuilder
impl Sync for BlockBuilder
impl Unpin for BlockBuilder
impl UnwindSafe for BlockBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,