space-traders 0.1.1

Async SpaceTraders API client for Rust.
Documentation
//! Generated by: <https://openapi-generator.tech>
//!
//! Version of specification: `2.0.0`

use serde::{Deserialize, Serialize};

/// Meta details for pagination.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Meta {
    /// Shows the total amount of items of this kind that exist.
    #[serde(rename = "total")]
    pub total: u32,
    /// A page denotes an amount of items, offset from the first item. Each page holds an amount of items equal to the `limit`.
    #[serde(rename = "page")]
    pub page: u32,
    /// The amount of items in each page. Limits how many items can be fetched at once.
    #[serde(rename = "limit")]
    pub limit: u32,
}

impl Meta {
    /// Create value with optional fields set to `None`.
    #[allow(clippy::too_many_arguments)]
    pub fn new(total: u32, page: u32, limit: u32) -> Meta {
        Meta { total, page, limit }
    }
}