Skip to main content

read

Function read 

Source
pub fn read(src: &[u8]) -> Result<(StepModel, Report), Error>
Expand description

Read STEP source into the schema-faithful model, returning a provenance Report.

The generated read is per-entity fallible: an entity whose own attributes the strict reader cannot consume is dropped (reason recorded), never panicking. A read failure pre-drops that entity in the next drop_pass, so its referrers cascade through the same engine. The loop is bounded and converges in ≤2 real iterations (own-attr readability is graph-independent, so all failures surface in the first build; the second drop_pass cascades them to a clean set).

§Errors

Returns a Error only if the source does not parse. A parsed source never fails the read: a malformed entity is dropped with a reason in Report::dropped (the generated read is structurally panic-free).