Expand description
Methods for dumping serializable structs to a compressed binary format, used to allow fast startup times
Currently syntect serializes SyntaxSet structs with dump_to_uncompressed_file
into .packdump files and likewise ThemeSet structs to .themedump files with dump_to_file.
You can use these methods to manage your own caching of compiled syntaxes and
themes. And even your own serde::Serialize structures if you want to
be consistent with your format.
Functionsยง
- dump_binary 
- Dumps an object to a binary array in the same format as dump_to_writer
- dump_to_ file 
- Dumps an encodable object to a file at a given path, in the same format as dump_to_writer
- dump_to_ uncompressed_ file 
- To be used when serializing a SyntaxSetto a file. ASyntaxSetitself shall not be compressed, because the data for its lazy-loaded syntaxes are already compressed. Compressing another time just results in bad performance.
- dump_to_ writer 
- Dumps an object to the given writer in a compressed binary format
- from_binary 
- Returns a fully loaded object from a binary dump.
- from_dump_ file 
- Returns a fully loaded object from a binary dump file.
- from_reader 
- A helper function for decoding and decompressing data from a reader
- from_uncompressed_ data 
- To be used when deserializing a SyntaxSetfrom raw data, for example data that has been embedded in your own binary with theinclude_bytes!macro.
- from_uncompressed_ dump_ file 
- To be used when deserializing a SyntaxSetthat was previously written to file using dump_to_uncompressed_file.