Skip to main content

parse

Function parse 

Source
pub fn parse(text: &str) -> Result<Parsed<RseFile>, MotorError>
Expand description

Reads a .rse file.

An engine with an error is skipped, with the error as a warning, when other engines in the file read. An <engine> nested inside another engine is not read.

§Errors

MotorError::Syntax, with the line number, for XML that isn’t well formed (or has a DTD), elements nested more than MAX_ELEMENT_DEPTH deep, or no <engine> elements; and, when no engine reads, the first engine’s error: a missing required attribute (code, dia, len, initWt, propWt), an unreadable or non-finite number, a non-positive diameter or length, a negative mass, fewer than two points, a point without t or f, or negative or decreasing time.