fbsim-core 1.0.0-beta.2

A library for american football simulation
Documentation
#![doc = include_str!("../../docs/league/team.md")]
use serde::{Serialize, Deserialize};

#[cfg(feature = "rocket_okapi")]
use rocket_okapi::okapi::schemars;
#[cfg(feature = "rocket_okapi")]
use rocket_okapi::okapi::schemars::JsonSchema;

/// # `LeagueTeam` struct
///
/// A `LeagueTeam` represents a football team in a football league.
/// Since a team's properties (skill levels, team name, etc.) can change
/// over the course of many seasons, this struct is mainly just used
/// as a unique ID for a given team
#[cfg_attr(feature = "rocket_okapi", derive(JsonSchema))]
#[cfg_attr(feature = "wasm", derive(tsify_next::Tsify))]
#[cfg_attr(feature = "wasm", tsify(into_wasm_abi, from_wasm_abi))]
#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Serialize, Deserialize)]
pub struct LeagueTeam {}

impl Default for LeagueTeam {
    /// Default constructor for the `LeagueTeam` struct
    ///
    /// ### Example
    /// ```
    /// use fbsim_core::league::team::LeagueTeam;
    ///
    /// let my_league_team = LeagueTeam::default();
    /// ```
    fn default() -> Self {
        LeagueTeam{}
    }
}

impl LeagueTeam {
    /// Constructor for the `LeagueTeam` struct
    ///
    /// ### Example
    /// ```
    /// use fbsim_core::league::team::LeagueTeam;
    ///
    /// let my_league_team = LeagueTeam::new();
    /// ```
    pub fn new() -> LeagueTeam {
        LeagueTeam::default()
    }
}