Skip to main content

SaveFormat

Trait SaveFormat 

Source
pub trait SaveFormat {
    const NAME: &'static str;
    const VERSION: u32;
}
Expand description

A game’s save format: the type its saves are read into.

Required Associated Constants§

Source

const NAME: &'static str

The name the save’s type is written under: the struct name a text format may put before the save’s fields.

Source

const VERSION: u32

The version this build reads and writes. Raise it whenever a saved type changes shape or meaning.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§