#[non_exhaustive]pub struct ProfileMod {Show 20 fields
pub manifest_version: u32,
pub name: String,
pub author_name: String,
pub website_url: String,
pub display_name: String,
pub description: String,
pub game_version: String,
pub network_mode: String,
pub package_type: String,
pub install_mode: String,
pub installed_at_time: u64,
pub loaders: Vec<String>,
pub dependencies: Vec<String>,
pub incompatibilities: Vec<String>,
pub optional_dependencies: Vec<String>,
pub version_number: SemVer,
pub enabled: bool,
pub icon: String,
pub online_source: bool,
pub trusted_package: bool,
}Expand description
One installed mod, mirroring r2modman’s ManifestV2. Field order matches
r2modman’s declaration order; icon is never serialized.
#[non_exhaustive]: fields may be added as the schema grows.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.manifest_version: u32The manifest.json schema version the package declared.
name: StringThe package name, without its owner prefix.
The package owner, as Thunderstore spells it.
website_url: StringThe package’s homepage, or empty when it declared none.
display_name: StringThe name to show a user, which may differ from Self::name.
description: StringThe package’s own description, shown verbatim. Not validated or truncated, so a UI must treat it as untrusted text from an arbitrary uploader.
game_version: StringThe game version the package declared, carried through verbatim.
network_mode: Stringr2modman’s network-mode marker, carried through verbatim.
package_type: Stringr2modman’s package-type marker, carried through verbatim.
install_mode: Stringr2modman’s install-mode marker, carried through verbatim.
installed_at_time: u64When the mod was installed, as a Unix timestamp in milliseconds.
loaders: Vec<String>Mod loaders the package declared support for.
dependencies: Vec<String>Full Owner-Name-Version dependency strings.
incompatibilities: Vec<String>Packages this one declares it cannot coexist with.
optional_dependencies: Vec<String>Dependencies the package treats as optional.
version_number: SemVerThe installed version.
enabled: boolWhether the mod is currently enabled in the profile.
icon: StringNever written to mods.yml (r2modman strips it); ignored on read.
online_source: boolWhether the mod came from Thunderstore rather than a local import.
trusted_package: boolAbsent from the mods.yml that installed r2modmanPlus versions actually
write, so it must not be required: demanding it made importing a real
profile fail with missing field trustedPackage`` after every file had
already been copied into place.
Defaulting to false cannot change behavior, because nothing in the engine
branches on this flag; it is carried purely so a round-trip through
read()/write() does not drop a key a newer r2modman does write. false
is also the conservative reading of “is this package trusted”.
Trait Implementations§
Source§impl Clone for ProfileMod
impl Clone for ProfileMod
Source§fn clone(&self) -> ProfileMod
fn clone(&self) -> ProfileMod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more