juno_rust_proto/prost/cosmos-sdk/cosmos.base.query.v1beta1.rs
1/// PageRequest is to be embedded in gRPC request messages for efficient
2/// pagination. Ex:
3///
4/// message SomeRequest {
5/// Foo some_parameter = 1;
6/// PageRequest pagination = 2;
7/// }
8#[allow(clippy::derive_partial_eq_without_eq)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct PageRequest {
11 /// key is a value returned in PageResponse.next_key to begin
12 /// querying the next page most efficiently. Only one of offset or key
13 /// should be set.
14 #[prost(bytes = "vec", tag = "1")]
15 pub key: ::prost::alloc::vec::Vec<u8>,
16 /// offset is a numeric offset that can be used when key is unavailable.
17 /// It is less efficient than using key. Only one of offset or key should
18 /// be set.
19 #[prost(uint64, tag = "2")]
20 pub offset: u64,
21 /// limit is the total number of results to be returned in the result page.
22 /// If left empty it will default to a value to be set by each app.
23 #[prost(uint64, tag = "3")]
24 pub limit: u64,
25 /// count_total is set to true to indicate that the result set should include
26 /// a count of the total number of items available for pagination in UIs.
27 /// count_total is only respected when offset is used. It is ignored when key
28 /// is set.
29 #[prost(bool, tag = "4")]
30 pub count_total: bool,
31 /// reverse is set to true if results are to be returned in the descending order.
32 ///
33 /// Since: cosmos-sdk 0.43
34 #[prost(bool, tag = "5")]
35 pub reverse: bool,
36}
37/// PageResponse is to be embedded in gRPC response messages where the
38/// corresponding request message has used PageRequest.
39///
40/// message SomeResponse {
41/// repeated Bar results = 1;
42/// PageResponse page = 2;
43/// }
44#[allow(clippy::derive_partial_eq_without_eq)]
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct PageResponse {
47 /// next_key is the key to be passed to PageRequest.key to
48 /// query the next page most efficiently
49 #[prost(bytes = "vec", tag = "1")]
50 pub next_key: ::prost::alloc::vec::Vec<u8>,
51 /// total is total number of results available if PageRequest.count_total
52 /// was set, its value is undefined otherwise
53 #[prost(uint64, tag = "2")]
54 pub total: u64,
55}