Module savefile::prelude
[−]
[src]
Structs
Deserializer |
Object from which bytes to be deserialized are read. This is basically just a wrapped [std::io::Read] object, the version number of the file being read, and the current version number of the data structures in memory. |
Field | |
Removed | |
SchemaEnum | |
SchemaStruct | |
Serializer |
Object to which serialized data is to be written. This is basically just a wrapped [std::io::Write] object and a file protocol version number. |
Variant |
Enums
Schema |
The schema represents the save file format of your data. |
SchemaPrimitive |
Traits
Deserialize |
This trait must be implemented for all data structures you wish to be able to deserialize. |
ReprC |
This is a marker trait for types which have an in-memory layout that is packed and therefore identical to the layout that savefile will use on disk. This means that types for which this trait is implemented can be serialized very quickly by just writing their raw bits to disc. |
Serialize |
This trait must be implemented for all data structures you wish to be able to serialize. To actually serialize data: create a [Serializer], then call serialize on your data to save, giving the Serializer as an argument. |
WithSchema |