Skip to main content

Module native_object

Module native_object 

Source
Expand description

The NativeObject trait for opaque Rust structs exposed as Clojure values.

Unlike Resource (which uses Arc for deterministic Drop), native objects live behind GcPtr and participate in tracing GC. They are intended for Rust values whose lifetime is managed by the garbage collector.

Structs§

NativeObjectBox
A type-erased wrapper around Box<dyn NativeObject>.

Traits§

NativeObject
An opaque Rust value that can be wrapped as a Clojure Value::NativeObject.

Functions§

gc_native_object
Convenience: allocate a NativeObject on the GC heap.