Skip to main content

SaveLevel

Struct SaveLevel 

Source
pub struct SaveLevel {
    pub level: u16,
    pub save_id: u32,
    pub records: Vec<SaveRecord>,
    pub valid: bool,
    pub d_stack_depth: usize,
    pub packing_mode: bool,
    pub vm_alloc_mode: bool,
    pub object_format: i32,
    pub gstate: GraphicsState,
    pub gstate_stack: Vec<GstateEntry>,
    pub gstate_store_len: usize,
    pub marks: VmMarks,
}
Expand description

One save level’s state.

Fields§

§level: u16

Numeric level (1-based, 0 = no save active).

§save_id: u32

Unique save id for invalidation tracking.

§records: Vec<SaveRecord>

COW records accumulated during this save level.

§valid: bool

Whether this save level is still valid (becomes false on restore).

§d_stack_depth: usize

Snapshot of d_stack length at save time (for restore validation).

§packing_mode: bool

Saved packing mode (setpacking/currentpacking).

§vm_alloc_mode: bool

Saved VM allocation mode (setglobal/currentglobal).

§object_format: i32

Saved binary object format (setobjectformat/currentobjectformat).

§gstate: GraphicsState

Saved graphics state and graphics state stack.

§gstate_stack: Vec<GstateEntry>§gstate_store_len: usize

Context::gstate_store length at save time.

gstate_store backs PsValue::Gstate, and a gstate object is a composite in local VM, so restore has to reclaim the ones created after the save. Without this the store would grow monotonically and each stale slot would keep naming entities the restore released.

§marks: VmMarks

Local-VM high-water marks, for reclamation on restore.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(value: T, _simd: S) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.