> For the complete documentation index, see [llms.txt](https://docs.play.cronos.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.play.cronos.org/readme-1/classes/structorg_1_1defi__wallet__core_1_1_pagination.md).

# org::defi\_wallet\_core::Pagination

struct for efficient pagination

`#include <nft.h>`

## Public Functions

|                                                                               | Name                                                       |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------- |
|                                                                               | [**Pagination**](#function-pagination)()                   |
| bool                                                                          | [**get\_enable**](#function-get-enable)() const            |
| [rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)< uint8\_t > | [**get\_key**](#function-get-key)() const                  |
| uint64\_t                                                                     | [**get\_offset**](#function-get-offset)() const            |
| uint64\_t                                                                     | [**get\_limit**](#function-get-limit)() const              |
| bool                                                                          | [**get\_count\_total**](#function-get-count-total)() const |
| bool                                                                          | [**get\_reverse**](#function-get-reverse)() const          |

## Public Attributes

|                                                                               | Name                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bool                                                                          | <p><a href="#variable-enable"><strong>enable</strong></a><br>Set true to enable the pagination.</p>                                                                                                                          |
| [rust::Vec](/readme-1/classes/classrust_1_1cxxbridge1_1_1_vec.md)< uint8\_t > | <p><a href="#variable-key"><strong>key</strong></a><br>key is a value returned in PageResponse.next\_key to begin querying the next page most efficiently.</p>                                                               |
| uint64\_t                                                                     | <p><a href="#variable-offset"><strong>offset</strong></a><br>offset is a numeric offset that can be used when key is unavailable.</p>                                                                                        |
| uint64\_t                                                                     | <p><a href="#variable-limit"><strong>limit</strong></a><br>limit is the total number of results to be returned in the result page.</p>                                                                                       |
| bool                                                                          | <p><a href="#variable-count-total"><strong>count\_total</strong></a><br>count\_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs.</p> |
| bool                                                                          | <p><a href="#variable-reverse"><strong>reverse</strong></a><br>reverse is set to true if results are to be returned in the descending order.</p>                                                                             |

## Public Functions Documentation

### function Pagination

```cpp
Pagination()
```

### function get\_enable

```cpp
bool get_enable() const
```

### function get\_key

```cpp
rust::Vec< uint8_t > get_key() const
```

### function get\_offset

```cpp
uint64_t get_offset() const
```

### function get\_limit

```cpp
uint64_t get_limit() const
```

### function get\_count\_total

```cpp
bool get_count_total() const
```

### function get\_reverse

```cpp
bool get_reverse() const
```

## Public Attributes Documentation

### variable enable

```cpp
bool enable;
```

Set true to enable the pagination.

A workaround filed for enabling pagination. It could be changed to std::optional if <https://github.com/dtolnay/cxx/issues/87> fixed

### variable key

```cpp
rust::Vec< uint8_t > key;
```

key is a value returned in PageResponse.next\_key to begin querying the next page most efficiently.

Only one of offset or key should be set.

### variable offset

```cpp
uint64_t offset;
```

offset is a numeric offset that can be used when key is unavailable.

It is less efficient than using key. Only one of offset or key should be set.

### variable limit

```cpp
uint64_t limit;
```

limit is the total number of results to be returned in the result page.

If left empty it will default to a value to be set by each app.

### variable count\_total

```cpp
bool count_total;
```

count\_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs.

count\_total is only respected when offset is used. It is ignored when key is set.

### variable reverse

```cpp
bool reverse;
```

reverse is set to true if results are to be returned in the descending order.

Since: cosmos-sdk 0.43

***

Updated on 2023-01-11 at 18:25:18 +0800
