Skip to main content

Snapshot

Struct Snapshot 

Source
#[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§

Source§

impl<T> Clone for Snapshot<T>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Copy for Snapshot<T>

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