#[doc(hidden)]pub struct Snapshot<T> {
class: &'static SnapshotClass,
encode: fn(&T) -> Result<SEXP, String>,
decode: fn(SEXP) -> Result<T, String>,
}Expand description
How a value of T goes into a save and comes back from one: its carrier
class and the serde encoding. T::__mx_snapshot() gives it for a serde
type.
Fields§
§class: &'static SnapshotClass§encode: fn(&T) -> Result<SEXP, String>§decode: fn(SEXP) -> Result<T, String>Trait Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes