pub struct ModDetail {
pub brands: HashMap<String, ModDetailBrand>,
pub issues: HashSet<ModDetailError>,
pub item_brands: HashSet<String>,
pub item_categories: HashSet<String>,
pub l10n: HashMap<String, HashMap<String, String>>,
pub placeables: HashMap<String, ModDetailPlace>,
pub vehicles: HashMap<String, ModDetailVehicle>,
}Expand description
Mod Detail Data
Fields§
§brands: HashMap<String, ModDetailBrand>list of brands
issues: HashSet<ModDetailError>list of detected issues
item_brands: HashSet<String>Item brands
item_categories: HashSet<String>Item categories
l10n: HashMap<String, HashMap<String, String>>l10n languages, keys, and strings
placeables: HashMap<String, ModDetailPlace>placables
vehicles: HashMap<String, ModDetailVehicle>vehicles
Implementations§
Source§impl ModDetail
impl ModDetail
Sourcepub fn fast_fail(e: ModDetailError) -> Self
pub fn fast_fail(e: ModDetailError) -> Self
Create new mod detail record with a single error condition
Sourcepub fn add_issue(&mut self, issue: ModDetailError) -> &mut Self
pub fn add_issue(&mut self, issue: ModDetailError) -> &mut Self
Add an error to a mod detail record
Sourcepub fn add_lang(&mut self, language: &str, key: &str, value: &str) -> &mut Self
pub fn add_lang(&mut self, language: &str, key: &str, value: &str) -> &mut Self
Add (or alter) a language code with a new key and string
Sourcepub fn add_brand(
&mut self,
key_name: &str,
title: Option<&str>,
) -> &mut ModDetailBrand
pub fn add_brand( &mut self, key_name: &str, title: Option<&str>, ) -> &mut ModDetailBrand
Add a brand record
Sourcepub fn to_json_pretty(&self) -> String
pub fn to_json_pretty(&self) -> String
Output as pretty-print JSON
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModDetail
impl RefUnwindSafe for ModDetail
impl Send for ModDetail
impl Sync for ModDetail
impl Unpin for ModDetail
impl UnwindSafe for ModDetail
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