Trait savefile::WithSchema [−][src]
This trait must be implemented by all data structures you wish to be able to save. It must encode the schema for the datastructure when saved using the given version number. When files are saved, the schema is encoded into the file. when loading, the schema is inspected to make sure that the load will safely succeed. This is only for increased safety, the file format does not in fact use the schema for any other purpose, the design is schema-less at the core, the schema is just an added layer of safety (which can be disabled).
Required Methods
fn schema(version: u32) -> Schema
Returns a representation of the schema used by this Serialize implementation for the given version.
Implementations on Foreign Types
impl WithSchema for String
[src]
impl WithSchema for String
impl<K: WithSchema + Eq + Hash, V: WithSchema, S: BuildHasher> WithSchema for HashMap<K, V, S>
[src]
impl<K: WithSchema + Eq + Hash, V: WithSchema, S: BuildHasher> WithSchema for HashMap<K, V, S>
impl<T> WithSchema for PhantomData<T>
[src]
impl<T> WithSchema for PhantomData<T>
impl<T: WithSchema> WithSchema for Option<T>
[src]
impl<T: WithSchema> WithSchema for Option<T>
impl WithSchema for BitVec
[src]
impl WithSchema for BitVec
impl<T: WithSchema> WithSchema for BinaryHeap<T>
[src]
impl<T: WithSchema> WithSchema for BinaryHeap<T>
impl<T: WithSchema> WithSchema for Vec<T>
[src]
impl<T: WithSchema> WithSchema for Vec<T>
impl<T1> WithSchema for [T1; 0]
[src]
impl<T1> WithSchema for [T1; 0]
impl<T1: WithSchema> WithSchema for [T1; 1]
[src]
impl<T1: WithSchema> WithSchema for [T1; 1]
impl<T1: WithSchema> WithSchema for [T1; 2]
[src]
impl<T1: WithSchema> WithSchema for [T1; 2]
impl<T1: WithSchema> WithSchema for [T1; 3]
[src]
impl<T1: WithSchema> WithSchema for [T1; 3]
impl<T1: WithSchema, T2: WithSchema, T3: WithSchema> WithSchema for (T1, T2, T3)
[src]
impl<T1: WithSchema, T2: WithSchema, T3: WithSchema> WithSchema for (T1, T2, T3)
impl<T1: WithSchema, T2: WithSchema> WithSchema for (T1, T2)
[src]
impl<T1: WithSchema, T2: WithSchema> WithSchema for (T1, T2)
impl<T1: WithSchema> WithSchema for (T1,)
[src]
impl<T1: WithSchema> WithSchema for (T1,)
impl<T: Array<Item = u8>> WithSchema for ArrayString<T>
[src]
impl<T: Array<Item = u8>> WithSchema for ArrayString<T>
impl<T: WithSchema> WithSchema for Box<T>
[src]
impl<T: WithSchema> WithSchema for Box<T>
impl<T: WithSchema> WithSchema for Rc<T>
[src]
impl<T: WithSchema> WithSchema for Rc<T>
impl<T: WithSchema> WithSchema for Arc<T>
[src]
impl<T: WithSchema> WithSchema for Arc<T>
impl<T: WithSchema> WithSchema for RefCell<T>
[src]
impl<T: WithSchema> WithSchema for RefCell<T>
impl<T: WithSchema> WithSchema for Cell<T>
[src]
impl<T: WithSchema> WithSchema for Cell<T>
impl WithSchema for ()
[src]
impl WithSchema for ()
impl WithSchema for AtomicBool
[src]
impl WithSchema for AtomicBool
impl WithSchema for AtomicU8
[src]
impl WithSchema for AtomicU8
impl WithSchema for AtomicI8
[src]
impl WithSchema for AtomicI8
impl WithSchema for AtomicU16
[src]
impl WithSchema for AtomicU16
impl WithSchema for AtomicI16
[src]
impl WithSchema for AtomicI16
impl WithSchema for AtomicU32
[src]
impl WithSchema for AtomicU32
impl WithSchema for AtomicI32
[src]
impl WithSchema for AtomicI32
impl WithSchema for AtomicU64
[src]
impl WithSchema for AtomicU64
impl WithSchema for AtomicI64
[src]
impl WithSchema for AtomicI64
impl WithSchema for AtomicUsize
[src]
impl WithSchema for AtomicUsize
impl WithSchema for AtomicIsize
[src]
impl WithSchema for AtomicIsize
impl WithSchema for bool
[src]
impl WithSchema for bool
impl WithSchema for u8
[src]
impl WithSchema for u8
impl WithSchema for i8
[src]
impl WithSchema for i8
impl WithSchema for u16
[src]
impl WithSchema for u16
impl WithSchema for i16
[src]
impl WithSchema for i16
impl WithSchema for u32
[src]
impl WithSchema for u32
impl WithSchema for i32
[src]
impl WithSchema for i32
impl WithSchema for u64
[src]
impl WithSchema for u64
impl WithSchema for i64
[src]
impl WithSchema for i64
impl WithSchema for usize
[src]
impl WithSchema for usize
impl WithSchema for isize
[src]
impl WithSchema for isize
impl WithSchema for f32
[src]
impl WithSchema for f32
impl WithSchema for f64
[src]
impl WithSchema for f64
Implementors
impl WithSchema for Field
impl WithSchema for Variant
impl WithSchema for SchemaStruct
impl WithSchema for SchemaPrimitive
impl WithSchema for SchemaEnum
impl WithSchema for Schema
impl<T: WithSchema> WithSchema for Removed<T>