pub struct BlockBuilder<P: NonceProvider = Miner> { /* private fields */ }Expand description
A builder to build a Block.
Implementations§
Source§impl<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_protocol_version(self, protocol_version: u8) -> Self
pub fn with_protocol_version(self, protocol_version: u8) -> Self
Adds a protocol version to a 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) -> Self
pub fn with_nonce_provider(self, nonce_provider: P) -> Self
Adds a nonce provider to a BlockBuilder.
Trait Implementations§
Source§impl<P: Clone + NonceProvider> Clone for BlockBuilder<P>
impl<P: Clone + NonceProvider> Clone for BlockBuilder<P>
Source§fn clone(&self) -> BlockBuilder<P>
fn clone(&self) -> BlockBuilder<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<P> Freeze for BlockBuilder<P>where
P: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request