pub fn write(file: &RseFile) -> Result<String, MotorError>Expand description
Writes a .rse file in RockSim’s layout and attribute order, after an XML comment naming the
program that wrote it, its version and its designation
(<!-- FusionSpace HPR 0.1.0 · FS-ACHERNAR · SW · TOOL 001 -->, hpr_core::tool::stamp). RockSim’s files
start at <engine-database> with no XML declaration, so the comment is the first line. The
reader, as any XML reader, skips comments, so the file reads back the same.
§Errors
MotorError::Inconsistentfor no engines, an engine with fewer than two points, points of which only some carrymorcg, text holding a character XML 1.0 can’t carry, or a curve that ends above half its peak thrust, which the reader would refuse as cut off.MotorError::Domainfor the values the reader rejects: non-finite numbers, a non-positive diameter or length, negative masses or times, and decreasing times.