#[non_exhaustive]pub struct GameDef {
pub slug: String,
pub uuid: String,
pub meta: Meta,
pub distributions: Vec<Distribution>,
pub profiles: Vec<GameProfile>,
}Expand description
A single game’s definition.
#[non_exhaustive]: fields may be added as the ecosystem schema grows.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.slug: StringThe Thunderstore community slug.
uuid: StringThe schema’s stable identifier for this game.
meta: MetaDisplay metadata (name, icon).
distributions: Vec<Distribution>Store distributions (Steam/Epic/etc.) at the game level.
profiles: Vec<GameProfile>Per-manager profiles. Most games have one; a few add a dedicated-server profile whose install rules match the primary profile’s.
Implementations§
Source§impl GameDef
impl GameDef
Sourcepub fn display_name(&self) -> &str
pub fn display_name(&self) -> &str
The human-readable display name of the game.
Sourcepub fn profile(&self) -> Option<&GameProfile>
pub fn profile(&self) -> Option<&GameProfile>
Returns the primary profile to route against: the first game-instance
profile, or the first profile of any kind.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GameDef
impl<'de> Deserialize<'de> for GameDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GameDef
impl RefUnwindSafe for GameDef
impl Send for GameDef
impl Sync for GameDef
impl Unpin for GameDef
impl UnsafeUnpin for GameDef
impl UnwindSafe for GameDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more