A module for parsing raw byte slices into SoR
data.
parse_line | Parses a row of SoR data, i (as a &[u8] ), into a Option<Vec<Data>>
Returning Some if i was a valid sor row, None otherwise. It parses
using the most conservative precedence possible. Types bool are parsed
first, then int , then float , then string .
If a field is invalid, returns a None .
|
parse_line_with_schema | Parses a row of SoR data, i (as a &[u8] ), into a Option<Vec<Data>> ,
returning Some if the data types in i matches the schema . If the data
types match, but i contains fewer fields than schema , than
Data::Null is inserted. If the row has more fields than schema , then
the extra fields are discarded.
|