[−][src]Crate ion_binary_rs
Ion Binary in Rust
Ion binary is a library written in safe rust for parsing Amazon's Ion binary format.
It doesn't handle the text format and it cannot encode complex structures, just the primitives but it can parse any Ion blob you find.
How to use the library
First of all, you need to be aware of the trade offs that we took for this library:
- The API returns strings instead of Symbols. If needed we can add symbol, but we think string is the simpler and safer bet for now.
- You can add shared tables for binary blobs that doesn't have all the required symbols
We have implemented (and still are) the amazon ion test-suite. So you can check all the examples.
Example
TODO
Structs
IonParser | The library entry point. |
Enums
IonParserError | Indicated a problem in the binary blob internal structure. When all data is read the library will return IonParserError::BinaryError(ParsingError::NoDataToRead). |
IonValue | The structure wrapping all possible return ion values by the IonParser. |
NullIonValue | Instead of wrapping each IonValue in an Option in order to represent the null value, we opted to join all Null values in the IonValue::Null(_) which contains this struct. Here you can check what kind of null you got. We do this because we believe is more ergonomic and simplifies the API handling. |
ParsingError | This errors indicate a problem in a primitive parsing. It comes always wrapped by the "BinaryError" of the error type "IonParserError". |
Symbol | A table symbol. It can b used together with the "with_shared_table" method in order to define new shared tables. |
SymbolContextError | Errors that can happen related with the Symbol Table. |