Struct tendermint::abci::request::Query
source · pub struct Query {
pub data: Bytes,
pub path: String,
pub height: Height,
pub prove: bool,
}
Expand description
Queries for data from the application at current or past height.
Fields§
§data: Bytes
Raw query bytes.
Can be used with or in lieu of path
.
path: String
Path of the request, like an HTTP GET
path.
Can be used with or in lieu of data
.
Applications MUST interpret /store
as a query by key on the underlying
store. The key SHOULD be specified in the Data field. Applications SHOULD
allow queries over specific types like /accounts/...
or /votes/...
.
height: Height
The block height for which the query should be executed.
The default 0
returns data for the latest committed block. Note that
this is the height of the block containing the application’s Merkle root
hash, which represents the state as it was after committing the block at
height - 1
.
prove: bool
Whether to return a Merkle proof with the response, if possible.
Trait Implementations§
source§impl From<Query> for RequestQuery
impl From<Query> for RequestQuery
source§impl From<Query> for RequestQuery
impl From<Query> for RequestQuery
source§impl From<Query> for RequestQuery
impl From<Query> for RequestQuery
source§impl Protobuf<RequestQuery> for Query
impl Protobuf<RequestQuery> for Query
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Vec<u8>
(or equivalent).source§impl Protobuf<RequestQuery> for Query
impl Protobuf<RequestQuery> for Query
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Vec<u8>
(or equivalent).source§impl Protobuf<RequestQuery> for Query
impl Protobuf<RequestQuery> for Query
source§fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
fn encode_length_delimited<B>(self, buf: &mut B) -> Result<(), Error>where
B: BufMut,
source§fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, Error>where
B: Buf,
source§fn encoded_len(self) -> usize
fn encoded_len(self) -> usize
source§fn decode_vec(v: &[u8]) -> Result<Self, Error>
fn decode_vec(v: &[u8]) -> Result<Self, Error>
Vec<u8>
(or equivalent).source§impl TryFrom<RequestQuery> for Query
impl TryFrom<RequestQuery> for Query
source§impl TryFrom<RequestQuery> for Query
impl TryFrom<RequestQuery> for Query
source§impl TryFrom<RequestQuery> for Query
impl TryFrom<RequestQuery> for Query
impl Eq for Query
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl !Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)