Struct bee_block::BlockBuilder
source · [−]pub struct BlockBuilder<P: NonceProvider = Miner> { /* private fields */ }Expand description
A builder to build a Block.
Implementations
sourceimpl<P: NonceProvider> BlockBuilder<P>
impl<P: NonceProvider> BlockBuilder<P>
sourcepub fn new(parents: Parents) -> Self
pub fn new(parents: Parents) -> Self
Creates a new BlockBuilder.
sourcepub fn with_payload(self, payload: Payload) -> Self
pub fn with_payload(self, payload: Payload) -> Self
Adds a payload to a BlockBuilder.
sourcepub fn with_nonce_provider(self, nonce_provider: P, target_score: f64) -> Self
pub fn with_nonce_provider(self, nonce_provider: P, target_score: f64) -> Self
Adds a nonce provider to a BlockBuilder.
Trait Implementations
sourceimpl<P: Clone + NonceProvider> Clone for BlockBuilder<P>
impl<P: Clone + NonceProvider> Clone for BlockBuilder<P>
sourcefn clone(&self) -> BlockBuilder<P>
fn clone(&self) -> BlockBuilder<P>
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<P> RefUnwindSafe for BlockBuilder<P> where
P: RefUnwindSafe,
impl<P> Send for BlockBuilder<P> where
P: Send,
impl<P> Sync for BlockBuilder<P> where
P: Sync,
impl<P> Unpin for BlockBuilder<P> where
P: Unpin,
impl<P> UnwindSafe for BlockBuilder<P> where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more