struct DumpState {
seen: HashMap<usize, u32>,
objects: Vec<DumpedObject>,
symbols: Vec<DumpedSymbol>,
env: Vec<DumpedBinding>,
}Fields§
§seen: HashMap<usize, u32>Maps live pointer address -> assigned object id (handles cycles + dedup)
objects: Vec<DumpedObject>§symbols: Vec<DumpedSymbol>§env: Vec<DumpedBinding>Implementations§
Source§impl DumpState
impl DumpState
fn new() -> Self
Sourcefn dump_object(&mut self, obj: Gc<ObjectType<'_>>) -> u32
fn dump_object(&mut self, obj: Gc<ObjectType<'_>>) -> u32
Serialize an object and return its id. If already visited (cycle or shared reference), returns the cached id immediately.
fn alloc_id(&mut self, placeholder: DumpedObject) -> u32
Sourcefn dump_symbols(&mut self, cx: &Context<'_>)
fn dump_symbols(&mut self, cx: &Context<'_>)
Walk the global symbol table and serialize each symbol + its function cell.
Sourcefn dump_env(&mut self, env: &Rt<Env<'_>>, _cx: &Context<'_>)
fn dump_env(&mut self, env: &Rt<Env<'_>>, _cx: &Context<'_>)
Serialize the Env variable bindings (symbol -> value mappings).
fn into_output(self) -> String
Auto Trait Implementations§
impl Freeze for DumpState
impl RefUnwindSafe for DumpState
impl Send for DumpState
impl Sync for DumpState
impl Unpin for DumpState
impl UnsafeUnpin for DumpState
impl UnwindSafe for DumpState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more