Skip to main content

read_txi_from_bytes_with_options

Function read_txi_from_bytes_with_options 

Source
pub fn read_txi_from_bytes_with_options(
    bytes: &[u8],
    options: TxiReadOptions,
) -> Result<Txi, TxiError>
Expand description

Reads TXI data from bytes with explicit parse options.

ยงErrors

TxiError::TextDecoding when bytes are not valid text in the parse encoding, and TxiError::InvalidData when a coordinate block declares more rows than follow it.

An unrecognised command is not an error. The engine ignores one silently and this stores it verbatim so the writer can re-emit it, so a file full of commands nothing here knows still round-trips.