TestTaskState

Trait TestTaskState 

Source
pub trait TestTaskState: Send {
    type Event: Clone + Send + Sync;
    type Error: Display;

    // Required methods
    fn handle_event<'life0, 'async_trait>(
        &'life0 mut self,
        __arg1: (Self::Event, usize),
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 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

Source

type Error: Display

Type of error produced 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<(), Self::Error>> + 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§

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

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>>, <TYPES as NodeType>::Membership: Membership<TYPES, Storage = TestStorage<TYPES>>,

Source§

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