#[non_exhaustive]pub enum Collector {
Auto,
DeferredReferenceCounting,
Null,
Copying,
MarkSweep,
}Expand description
Garbage-collector selection, mostly mirroring wasmtime::Collector.
Our interpreter implements a single tracing strategy — non-moving stop-the-world
mark-sweep. Auto selects it; Null stays allocate-only (matching wasmtime). The
extra Collector::MarkSweep variant names that strategy explicitly (it has no wasmtime
analog — naming it keeps us a superset, so drop-in embedder code, which never references it,
still compiles). The two collectors we do not implement —
Collector::DeferredReferenceCounting and Collector::Copying — are rejected at
Engine::new, the same way wasmtime errors when a selected collector is
unavailable. See docs/ARCHITECTURE.md §14.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auto
Automatically select a collector — resolves to non-moving mark-sweep here.
DeferredReferenceCounting
Deferred reference counting — not implemented (rejected at Engine::new).
Null
Allocate-only: never reclaims, traps on heap exhaustion.
Copying
Copying collector — not implemented (rejected at Engine::new).
MarkSweep
Non-moving stop-the-world mark-sweep (our own variant; no wasmtime analog).
Trait Implementations§
impl Copy for Collector
impl Eq for Collector
impl StructuralPartialEq for Collector
Auto Trait Implementations§
impl Freeze for Collector
impl RefUnwindSafe for Collector
impl Send for Collector
impl Sync for Collector
impl Unpin for Collector
impl UnsafeUnpin for Collector
impl UnwindSafe for Collector
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.