pub trait StateServer {
type InitialState: Serialize;
type State: DeserializeOwned;
// Required methods
fn query_state<'life0, 'life1, 'async_trait>(
&'life0 self,
initial_state: &'life1 Self::InitialState,
query_block: impl 'async_trait + Into<QueryBlock> + Send + 'static
) -> Pin<Box<dyn Future<Output = Result<BlockState<Self::State>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_states_since<'life0, 'life1, 'async_trait>(
&'life0 self,
initial_state: &'life1 Self::InitialState,
previous_block_hash: H256,
depth: usize
) -> Pin<Box<dyn Future<Output = Result<StatesSince<Self::State>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn subscribe_states<'life0, 'life1, 'async_trait>(
&'life0 self,
initial_state: &'life1 Self::InitialState,
confirmations: usize
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StateStreamItem<Self::State>>> + Send>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}