Struct pobsd_parser::game::Game
source · pub struct Game {Show 18 fields
pub uid: u32,
pub name: String,
pub cover: Option<String>,
pub engine: Option<String>,
pub setup: Option<String>,
pub runtime: Option<String>,
pub stores: Option<StoreLinks>,
pub hints: Option<String>,
pub genres: Option<Vec<String>>,
pub tags: Option<Vec<String>>,
pub year: Option<String>,
pub dev: Option<String>,
pub publi: Option<String>,
pub version: Option<String>,
pub status: Option<String>,
pub added: Option<String>,
pub updated: Option<String>,
pub igdb_id: Option<String>,
}
Expand description
Represents a game from the database.
It also includes an additional Game::uid
field
derived from the name of the game as well as the date to
which the game was added to the database. It therefore
provides an unique identifier under the assumption that no
game with the same name will be added the same dat into
the databas.
The name of some fields differs from the one used in the database itself: Genre and Store are plural since there can be more than one item for each and Pub translate to publi since pub is a reserved keyword in Rust.
All fields are optional strings or vectors of strings except for the name of the game which is mandatory. The parser does not try to be smart with dates and just store them as string.
Display
The Game
struct implement the core::fmt::Display
trait
and will be displayed as it would appear in the
PlayOnBSD database.
PartialOrd
The Game
struct implements the core::cmp::PartialOrd
trait
and Game
objects are ordered according to their name (without The or A).
Fields§
§uid: u32
An unique identifier generated from the name and added fields
name: String
The name of the game.
cover: Option<String>
The cover of the game.
engine: Option<String>
The engine used by the game.
setup: Option<String>
Step(s) to setup the game.
runtime: Option<String>
The executable in the package.
stores: Option<StoreLinks>
A vector with store urls.
hints: Option<String>
Hints (as the name imply).
genres: Option<Vec<String>>
A vector of genres associated with the game.
A vector of tags associated with the game.
year: Option<String>
Released year (can be text such as “early access”.
dev: Option<String>
Developer.
publi: Option<String>
Publisher.
version: Option<String>
Version of the game.
status: Option<String>
When tested on -current.
added: Option<String>
When added
updated: Option<String>
When updated
igdb_id: Option<String>
The IGDB Id of the game
Implementations§
Trait Implementations§
source§impl Display for Game
impl Display for Game
Display the game as it would appears in the database. See https://github.com/playonbsd/OpenBSD-Games-Database for details.