Skip to main content

SnapshotProbe

Struct SnapshotProbe 

Source
#[doc(hidden)]
pub struct SnapshotProbe<T>(&'static SnapshotClass, PhantomData<fn() -> T>);
Expand description

The receiver of the snapshot probe: the type’s class cell. The derive calls (&SnapshotProbe::<Self>::new(&CLASS)).__mx_snapshot() with SnapshotSerde and SnapshotNone in scope, in the type’s own TypedExternal impl, where the type is concrete.

Tuple Fields§

§0: &'static SnapshotClass§1: PhantomData<fn() -> T>

Implementations§

Source§

impl<T> SnapshotProbe<T>

Source

pub const fn new(class: &'static SnapshotClass) -> Self

The probe for T, whose carrier class is class.

Trait Implementations§

Source§

impl<T> SnapshotNone for &SnapshotProbe<T>

Source§

type Value = T

The type probed.
Source§

fn __mx_snapshot(&self) -> Option<Snapshot<T>>

None.

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: 8 bytes