Struct ethcore_blockchain::generator::BlockBuilder
source · [−]pub struct BlockBuilder { /* private fields */ }
Expand description
Utility to create blocks
Implementations
sourceimpl BlockBuilder
impl BlockBuilder
sourcepub fn add_blocks(&self, count: usize) -> Self
pub fn add_blocks(&self, count: usize) -> Self
Add count
number of blocks with default options.
sourcepub fn add_block_with<T>(&self, get_metadata: T) -> Self where
T: Fn() -> BlockOptions,
pub fn add_block_with<T>(&self, get_metadata: T) -> Self where
T: Fn() -> BlockOptions,
Add block with specified options.
sourcepub fn add_block_with_difficulty<T>(&self, difficulty: T) -> Self where
T: Into<U256>,
pub fn add_block_with_difficulty<T>(&self, difficulty: T) -> Self where
T: Into<U256>,
Add a block with given difficulty
sourcepub fn add_block_with_random_transactions(&self) -> Self
pub fn add_block_with_random_transactions(&self) -> Self
Add a block with randomly generated transactions.
sourcepub fn add_block_with_transactions<T>(&self, transactions: T) -> Self where
T: IntoIterator<Item = SignedTransaction>,
pub fn add_block_with_transactions<T>(&self, transactions: T) -> Self where
T: IntoIterator<Item = SignedTransaction>,
Add a block with given transactions.
sourcepub fn add_block_with_bloom(&self, bloom: Bloom) -> Self
pub fn add_block_with_bloom(&self, bloom: Bloom) -> Self
Add a block with given bloom filter.
sourcepub fn add_blocks_with<T>(&self, count: usize, get_metadata: T) -> Self where
T: Fn() -> BlockOptions,
pub fn add_blocks_with<T>(&self, count: usize, get_metadata: T) -> Self where
T: Fn() -> BlockOptions,
Add a bunch of blocks with given metadata.
Trait Implementations
sourceimpl Clone for BlockBuilder
impl Clone for BlockBuilder
sourcefn clone(&self) -> BlockBuilder
fn clone(&self) -> BlockBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more