pub struct PrototypeApi {
pub application: String,
pub application_version: String,
pub api_version: Number,
pub stage: String,
pub prototypes: Vec<Prototype>,
pub types: Vec<Concept>,
pub defines: Vec<Define>,
}Expand description
The JSON, deserializable from the machine-readable JSON format file.
See the Factorio documentation for more details.
Fields§
§application: StringThe application this documentation is for. Will always be "factorio".
application_version: StringThe version of the game that this documentation is for. An example would be "1.1.90".
api_version: NumberThe version of the machine-readable format itself. It is incremented every time the format changes.
stage: StringIndicates the state this documentation is for. Will always be "prototype" (as opposed to "runtime"; see the data lifecycle for more detail).
prototypes: Vec<Prototype>The list of prototypes that can be created. Equivalent to the prototypes page.
types: Vec<Concept>The list of types (concepts) that the prototypes use. Equivalent to the types page.
defines: Vec<Define>The list of defines that the game uses. Equivalent to the defines page.
Implementations§
Source§impl PrototypeApi
impl PrototypeApi
Sourcepub fn try_from_file<P: AsRef<Path>>(path: P) -> Result<Self, LoadingError>
pub fn try_from_file<P: AsRef<Path>>(path: P) -> Result<Self, LoadingError>
Reads the JSON data from the prototype-api.json file.