Function savefile::save_noschema [−][src]
pub fn save_noschema<T: WithSchema + Serialize>(
writer: &mut dyn Write,
version: u32,
data: &T
) -> Result<(), SavefileError>
Expand description
Write the given data
to the writer
.
The current version of data must be version
.
Do this write without writing any schema to disk.
As long as all the serializers and deserializers
are correctly written, the schema is not necessary.
Omitting the schema saves some space in the saved file,
but means that any mistake in implementation of the
Serialize or Deserialize traits will cause hard-to-troubleshoot
data corruption instead of a nice error message.