pub fn parse(source: Source) -> Result<PioModule<MulticonductorNetwork>, Error>Expand description
Parse one source into a compiled distribution module. The typed
MulticonductorNetwork is the module’s value; the reader’s findings are
the module’s diagnostics; the source itself is retained on the module, so
a same format emission echoes the input bytes exactly.
The format comes from the source’s declared format when one was selected,
the .dss or .glm extension otherwise, and for .json from
classify_distribution_json. GridLAB-D defaults to the PNNL 5.3 profile
(gridlabd, aliases glm and gridlabd-pnnl); gridlabd-arras selects
the Arras 4.3 profile explicitly. See crate::glm::parse for explicit
preprocessing inputs and the supported electrical profile.
XML documents and directories use distribution CIM detection.
§Errors
The operation failure carries the reader’s findings up to the failure and retains the source for span interpretation.