Skip to main content

Crate openbim_step

Crate openbim_step 

Source
Expand description

Generic ISO 10303 STEP Part 21 and EXPRESS syntax infrastructure.

The crate has no domain-schema dependency. It tokenizes bytes with spans, decodes physical-file strings, parses records into generic parameters, writes them back, partitions complete records, and offers a structural, explicitly partial EXPRESS declaration extractor.

Re-exports§

pub use recovery::Diagnostic;
pub use recovery::DiagnosticKind;
pub use recovery::OnMalformed;
pub use recovery::ParseOptions;
pub use recovery::ParseOutcome;
pub use recovery::Severity;
pub use schema::SchemaGraph;
pub use writer::write;
pub use writer::write_parameter;
pub use writer::write_to_string;

Modules§

escape
STEP string escape codec. STEP string-literal escape decoding and encoding.
express
Structural, explicitly partial EXPRESS declaration extraction. Explicitly structural, partial EXPRESS declaration extraction.
lexer
Physical-file tokenizer. Byte-level tokenizer for STEP physical files.
recovery
Malformed-record recovery policy and non-fatal diagnostics. Opt-in malformed-record recovery policy and non-fatal diagnostics.
schema
The parsed schema as a queryable graph.
writer
Semantic exchange writer. Semantic exchange writer.

Structs§

DataRecord
A simple or complex #id=...; instance in DATA;.
DataSection
The generic DATA; ... ENDSEC; section.
Exchange
A complete ISO 10303-21 exchange structure.
HeaderRecord
A record in HEADER;.
HeaderSection
The generic HEADER; ... ENDSEC; section.
InstanceId
An arbitrary-precision instance identifier as written by #42.
Partition
A half-open byte range containing one or more complete data records.
Record
One named parameter record within a DATA instance.
Records
Iterator over framed data records; see Scan::records.
Scan
A data section indexed by scan: the parsed header and an iterator over the framed data records.
ScannedRecord
One framed data record: #id = NAME(...); or #id = (A(...)B(...));.
Source
Source text used to resolve byte spans to human-readable locations.
SourceLocation
A source span resolved to a display location.
Span
A half-open byte range in the original source.
Spanned
A value paired with its source span.
StandardHeader
Standard header fields projected from raw header records.
StepError
Failure while tokenizing or semantically parsing a physical file.
Str
The owned model’s string: values of up to 22 bytes – nearly every number, GUID and entity name in a STEP file – are stored inline without an allocation, and longer ones are one shared Arc<str>.

Enums§

Event
A semantic parser event.
Instance
The body of a #id=...; instance, as written.
Parameter
One generic parameter value.

Constants§

MAX_PARAMETER_NESTING
Maximum nesting accepted for lists and typed parameters.

Traits§

EventSink
Consumer for parse events.

Functions§

data_record_spans
Locates complete data records.
decode_record
Parses the data record that occupies exactly span of input, with owned text as parse returns it.
decode_record_borrowed
decode_record with text borrowed from input wherever it needs no rewriting, as parse_events_borrowed returns it.
decode_record_borrowed_with
decode_record_borrowed under options; see decode_record_with.
decode_record_with
decode_record under options: the record exactly as parse_with reads it with the same options, and the diagnostics that parse reports for it.
is_step_file
Returns whether bytes begin with the ISO 10303-21 marker.
parse
Parses a physical file into an owned generic exchange structure.
parse_events
Parses a physical file and sends semantic records to sink.
parse_events_borrowed
Streams semantic records whose text borrows from input where it can.
parse_events_with
Streams semantic records under explicit ParseOptions, returning the non-fatal diagnostics collected on the way.
parse_parallel_with
Parses on up to threads threads, returning exactly what parse_with returns for the same input and options: the same exchange, the same diagnostics in the same order, the same error.
parse_with
Parses a physical file under explicit ParseOptions.
partition_data_records
Splits data records into at most partition_count balanced groups.
scan
Indexes the data records of a physical file without decoding them.