pub struct PaginationResponse<T> {
    pub time: DateTime<Utc>,
    pub status: Option<String>,
    pub mode: Option<Mode>,
    pub results: Option<Vec<T>>,
    pub previous: Option<String>,
    pub next: Option<String>,
    pub total: i64,
    pub page: i64,
    pub pages: i64,
}
Expand description

Generic struct for Endpoints that returns pagination information alongside data

Properties:

  • time: The time the request was made.
  • status: The status of the request.
  • mode: The mode of the request.
  • results: The actual results of the query.
  • previous: The URL of the previous page of results.
  • next: The URL for the next page of results.
  • total: The total number of results available.
  • page: The current page number
  • pages: The total number of pages in the response.

Fields

time: DateTime<Utc>

The time the request was made.

status: Option<String>

The status of the request.

mode: Option<Mode>

The mode of the request. Can be paper, live, or market_data

results: Option<Vec<T>>

The actual results of the query. Depends upon the given generics

previous: Option<String>

The URL of the previous page of results.

next: Option<String>

The URL for the next page of results.

total: i64

The total number of results available.

page: i64

The current page number

pages: i64

The total number of pages in the response.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more