pub trait Info: Send + Sync {
fn info<'life0, 'async_trait>(
&'life0 self,
info_request: RequestInfo
) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn echo<'life0, 'async_trait>(
&'life0 self,
echo_request: RequestEcho
) -> Pin<Box<dyn Future<Output = ResponseEcho> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn set_option<'life0, 'async_trait>(
&'life0 self,
_set_option_request: RequestSetOption
) -> Pin<Box<dyn Future<Output = ResponseSetOption> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn query<'life0, 'async_trait>(
&'life0 self,
_query_request: RequestQuery
) -> Pin<Box<dyn Future<Output = ResponseQuery> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
fn flush<'life0, 'async_trait>(
&'life0 self,
_flush_request: RequestFlush
) -> Pin<Box<dyn Future<Output = ResponseFlush> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait,
{ ... }
}
Available on crate feature
async-api
only.Expand description
Trait for initialization and for queries from the user.
Required Methods
sourcefn info<'life0, 'async_trait>(
&'life0 self,
info_request: RequestInfo
) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn info<'life0, 'async_trait>(
&'life0 self,
info_request: RequestInfo
) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Return information about the application state.
Crash Recovery
On startup, Tendermint calls the info
method to get the latest committed state of the app. The app
MUST return information consistent with the last block it successfully completed commit
for.
If the app succesfully committed block H
but not H+1
, then
last_block_height = H
last_block_app_hash = <hash returned by Commit for block H>
If the app failed during the commit
of block H
, then
last_block_height = H-1
last_block_app_hash = <hash returned by Commit for block H-1, which is the hash in the header of block H>
Equivalent to
ⓘ
async fn info(&self, info_request: RequestInfo) -> ResponseInfo
Provided Methods
sourcefn echo<'life0, 'async_trait>(
&'life0 self,
echo_request: RequestEcho
) -> Pin<Box<dyn Future<Output = ResponseEcho> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn echo<'life0, 'async_trait>(
&'life0 self,
echo_request: RequestEcho
) -> Pin<Box<dyn Future<Output = ResponseEcho> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Echo a string to test abci client/server implementation.
Equivalent to
ⓘ
async fn echo(&self, echo_request: RequestEcho) -> ResponseEcho
sourcefn set_option<'life0, 'async_trait>(
&'life0 self,
_set_option_request: RequestSetOption
) -> Pin<Box<dyn Future<Output = ResponseSetOption> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_option<'life0, 'async_trait>(
&'life0 self,
_set_option_request: RequestSetOption
) -> Pin<Box<dyn Future<Output = ResponseSetOption> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Set non-consensus critical application specific options.
Equivalent to
ⓘ
async fn set_option(&self, set_option_request: RequestSetOption) -> ResponseSetOption
sourcefn query<'life0, 'async_trait>(
&'life0 self,
_query_request: RequestQuery
) -> Pin<Box<dyn Future<Output = ResponseQuery> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
_query_request: RequestQuery
) -> Pin<Box<dyn Future<Output = ResponseQuery> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Query for data from the application at current or past height.
Equivalent to
ⓘ
async fn query(&self, query_request: RequestQuery) -> ResponseQuery
sourcefn flush<'life0, 'async_trait>(
&'life0 self,
_flush_request: RequestFlush
) -> Pin<Box<dyn Future<Output = ResponseFlush> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
_flush_request: RequestFlush
) -> Pin<Box<dyn Future<Output = ResponseFlush> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Signals that messages queued on the client should be flushed to the server.
Equivalent to
ⓘ
async fn flush(&self, flush_request: RequestFlush) -> ResponseFlush