[][src]Struct sc_basic_authorship::ProposerFactory

pub struct ProposerFactory<C, A> where
    A: TransactionPool
{ pub client: Arc<C>, pub transaction_pool: Arc<A>, }

Proposer factory.

Fields

client: Arc<C>

The client instance.

transaction_pool: Arc<A>

The transaction pool.

Methods

impl<B, E, Block, RA, A> ProposerFactory<SubstrateClient<B, E, Block, RA>, A> where
    A: TransactionPool<Block = Block> + 'static,
    B: Backend<Block> + Send + Sync + 'static,
    E: CallExecutor<Block> + Send + Sync + Clone + 'static,
    Block: BlockT,
    RA: Send + Sync + 'static,
    SubstrateClient<B, E, Block, RA>: ProvideRuntimeApi<Block>,
    <SubstrateClient<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: BlockBuilderApi<Block, Error = Error> + ApiExt<Block, StateBackend = StateBackendFor<B, Block>>, 
[src]

pub fn init_with_now(
    &mut self,
    parent_header: &<Block as BlockT>::Header,
    now: Box<dyn Fn() -> Instant + Send + Sync>
) -> Proposer<Block, SubstrateClient<B, E, Block, RA>, A>
[src]

Trait Implementations

impl<B, E, Block, RA, A> Environment<Block> for ProposerFactory<SubstrateClient<B, E, Block, RA>, A> where
    A: TransactionPool<Block = Block> + 'static,
    B: Backend<Block> + Send + Sync + 'static,
    E: CallExecutor<Block> + Send + Sync + Clone + 'static,
    Block: BlockT,
    RA: Send + Sync + 'static,
    SubstrateClient<B, E, Block, RA>: ProvideRuntimeApi<Block>,
    <SubstrateClient<B, E, Block, RA> as ProvideRuntimeApi<Block>>::Api: BlockBuilderApi<Block, Error = Error> + ApiExt<Block, StateBackend = StateBackendFor<B, Block>>, 
[src]

type CreateProposer = Ready<Result<Self::Proposer, Self::Error>>

A future that resolves to the proposer.

type Proposer = Proposer<Block, SubstrateClient<B, E, Block, RA>, A>

The proposer type this creates.

type Error = Error

Error which can occur upon creation.

Auto Trait Implementations

impl<C, A> RefUnwindSafe for ProposerFactory<C, A> where
    A: RefUnwindSafe,
    C: RefUnwindSafe

impl<C, A> Send for ProposerFactory<C, A> where
    C: Send + Sync

impl<C, A> Sync for ProposerFactory<C, A> where
    C: Send + Sync

impl<C, A> Unpin for ProposerFactory<C, A>

impl<C, A> UnwindSafe for ProposerFactory<C, A> where
    A: RefUnwindSafe,
    C: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,