1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
extern crate byteorder;
extern crate bytes;
extern crate futures;
extern crate futures_cpupool;
extern crate protobuf;
extern crate tls_api;
extern crate tokio_io;
extern crate tokio_proto;
extern crate tokio_service;
pub mod server;
pub mod types;
use types::*;
pub trait Application {
fn info(&self, req: &RequestInfo) -> ResponseInfo;
fn set_option(&self, req: &RequestSetOption) -> ResponseSetOption;
fn query(&self, p: &RequestQuery) -> ResponseQuery;
fn check_tx(&self, p: &RequestCheckTx) -> ResponseCheckTx;
fn init_chain(&self, p: &RequestInitChain) -> ResponseInitChain;
fn begin_block(&self, p: &RequestBeginBlock) -> ResponseBeginBlock;
fn deliver_tx(&self, p: &RequestDeliverTx) -> ResponseDeliverTx;
fn end_block(&self, p: &RequestEndBlock) -> ResponseEndBlock;
fn commit(&self, p: &RequestCommit) -> ResponseCommit;
fn echo(&self, p: &RequestEcho) -> ResponseEcho;
fn flush(&self, p: &RequestFlush) -> ResponseFlush;
}