pub fn parse(file: impl AsRef<Path>) -> Result<Modinfo, ModinfoError>Expand description
Parses a Modinfo.xml file and produces a Modinfo struct
It will auto-detect the version of the Modinfo.xml file (either V1 or V2)
§Arguments
file- a Path-like object pointing to a ModInfo.xml file
§Returns
A Result containing either a Modinfo struct or a ModinfoError
§Possible ModinfoError
ModinfoError::FsNotFound- the file does not existModinfoError::IoError- an I/O error occurredModinfoError::NoModinfoAuthor- no Author tag found (required)ModinfoError::NoModinfoDescription- no Description tag found (required)ModinfoError::NoModinfoName- no Name tag found (required)ModinfoError::NoModinfoVersion- no Version value found (required)ModinfoError::XMLError- an error occurred while trying to parse the XML (possibly invalid XML structure?)