Struct tetcore_test_client::TestClientBuilder[][src]

pub struct TestClientBuilder<Block: BlockT, Executor, Backend, G: GenesisInit> { /* fields omitted */ }

A builder for creating a test client instance.

Implementations

impl<Block: BlockT, Executor, G: GenesisInit> TestClientBuilder<Block, Executor, Backend<Block>, G>[src]

pub fn with_default_backend() -> Self[src]

Create new TestClientBuilder with default backend.

pub fn with_pruning_window(keep_blocks: u32) -> Self[src]

Create new TestClientBuilder with default backend and pruning window size

impl<Block: BlockT, Executor, Backend, G: GenesisInit> TestClientBuilder<Block, Executor, Backend, G>[src]

pub fn with_backend(backend: Arc<Backend>) -> Self[src]

Create a new instance of the test client builder.

pub fn set_keystore(self, keystore: SyncCryptoStorePtr) -> Self[src]

Set the keystore that should be used by the externalities.

pub fn genesis_init_mut(&mut self) -> &mut G[src]

Alter the genesis storage parameters.

pub fn backend(&self) -> Arc<Backend>[src]

Give access to the underlying backend of these clients

pub fn add_child_storage(
    self,
    child_info: &ChildInfo,
    key: impl AsRef<[u8]>,
    value: impl AsRef<[u8]>
) -> Self
[src]

Extend child storage

pub fn set_execution_strategy(
    self,
    execution_strategy: ExecutionStrategy
) -> Self
[src]

Set the execution strategy that should be used by all contexts.

pub fn set_block_rules(
    self,
    fork_blocks: ForkBlocks<Block>,
    bad_blocks: BadBlocks<Block>
) -> Self
[src]

Sets custom block rules.

pub fn enable_offchain_indexing_api(self) -> Self[src]

Enable the offchain indexing api.

pub fn build_with_executor<RuntimeApi>(
    self,
    executor: Executor
) -> (Client<Backend, Executor, Block, RuntimeApi>, LongestChain<Backend, Block>) where
    Executor: CallExecutor<Block> + 'static,
    Backend: Backend<Block>, 
[src]

Build the test client with the given native executor.

impl<Block: BlockT, E, Backend, G: GenesisInit> TestClientBuilder<Block, LocalCallExecutor<Backend, NativeExecutor<E>>, Backend, G>[src]

pub fn build_with_native_executor<RuntimeApi, I>(
    self,
    executor: I
) -> (Client<Backend, LocalCallExecutor<Backend, NativeExecutor<E>>, Block, RuntimeApi>, LongestChain<Backend, Block>) where
    I: Into<Option<NativeExecutor<E>>>,
    E: NativeExecutionDispatch + 'static,
    Backend: Backend<Block> + 'static, 
[src]

Build the test client with the given native executor.

Trait Implementations

impl<Block: BlockT, Executor, G: GenesisInit> Default for TestClientBuilder<Block, Executor, Backend<Block>, G>[src]

Auto Trait Implementations

impl<Block, Executor, Backend, G> !RefUnwindSafe for TestClientBuilder<Block, Executor, Backend, G>

impl<Block, Executor, Backend, G> Send for TestClientBuilder<Block, Executor, Backend, G> where
    Backend: Send + Sync,
    Executor: Send,
    G: Send

impl<Block, Executor, Backend, G> Sync for TestClientBuilder<Block, Executor, Backend, G> where
    Backend: Send + Sync,
    Executor: Sync,
    G: Sync

impl<Block, Executor, Backend, G> Unpin for TestClientBuilder<Block, Executor, Backend, G> where
    Executor: Unpin,
    G: Unpin,
    <Block as Block>::Hash: Unpin,
    <<Block as Block>::Header as Header>::Number: Unpin

impl<Block, Executor, Backend, G> !UnwindSafe for TestClientBuilder<Block, Executor, Backend, G>

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

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

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

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
    T: Bounded,
    S: TryInto<T>, 

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

impl<T> WithSubscriber for T[src]