Module syntect::dumps

source ·
Expand description

Methods for dumping serializable structs to a compressed binary format These are used to load and store the dumps used for fast startup times.

Currently syntect serializes SyntaxSet structs with dump_to_file into .packdump files and likewise ThemeSet structs to .themedump files.

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

Dumps an object to a binary array in the same format as dump_to_file
Dumps an encodable object to a file at a given path. If a file already exists at that path it will be overwritten. The files created are encoded with the bincode crate and then compressed with the flate2 crate.
Returns a fully loaded syntax set from a binary dump. Panics if the dump is invalid.
Returns a fully loaded syntax set from a binary dump file.