Trait hotshot_testing::test_task::TestTaskState

source ·
pub trait TestTaskState: Send {
    type Event: Clone + Send + Sync;

    // Required methods
    fn handle_event<'life0, 'async_trait>(
        &'life0 mut self,
        __arg1: (Self::Event, usize),
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = TestResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Type for mutable task state that can be used as the state for a Task

Required Associated Types§

source

type Event: Clone + Send + Sync

Type of event sent and received by the task

Required Methods§

source

fn handle_event<'life0, 'async_trait>( &'life0 mut self, __arg1: (Self::Event, usize), ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handles an event from one of multiple receivers.

source

fn check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TestResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check the result of the test.

Implementors§

source§

impl<TYPES: NodeType> TestTaskState for AnyTestTaskState<TYPES>

source§

type Event = Event<TYPES>

source§

impl<TYPES: NodeType<BlockHeader = TestBlockHeader>, V: Versions> TestTaskState for ConsistencyTask<TYPES, V>

source§

type Event = Event<TYPES>

source§

impl<TYPES: NodeType<InstanceState = TestInstanceState, ValidatedState = TestValidatedState, BlockHeader = TestBlockHeader>, I, N: ConnectedNetwork<TYPES::SignatureKey>, V: Versions> TestTaskState for SpinningTask<TYPES, N, I, V>
where I: TestableNodeImplementation<TYPES> + NodeImplementation<TYPES, Network = N, Storage = TestStorage<TYPES>, AuctionResultsProvider = TestAuctionResultsProvider<TYPES>>,

source§

type Event = Event<TYPES>

source§

impl<TYPES: NodeType, I: TestableNodeImplementation<TYPES>> TestTaskState for ViewSyncTask<TYPES, I>

source§

impl<TYPES: NodeType, I: TestableNodeImplementation<TYPES>, V: Versions> TestTaskState for OverallSafetyTask<TYPES, I, V>

source§

type Event = Event<TYPES>