Expand description
This crate provides a a self-owned data structure with an internal heap and garbage collection.
NData supports objects, arrays, strings, integers, floats, booleans, byte buffers, and null. DataObject, DataArray, and DataBytes instances maintain reference counts. Garbage collection is performed manually by calling the type’s gc() function.
Re-exports§
Modules§
- data
- dataarray
- This module defines the
DataArraystruct, a thread-safe, reference-counted list-like data structure (Vec<Data>) stored in a shared heap. - databytes
- dataobject
- This module defines the
DataObjectstruct, a thread-safe, reference-counted map-like data structure (HashMap<String, Data>) stored in a shared heap. - heap
- json_
util - sharedmutex
- A simple, shareable spinlock mutex implementation. Credit for the original spinlock logic: Mikhail Panfilov https://mnwa.medium.com/building-a-stupid-mutex-in-the-rust-d55886538889
- usizemap
Structs§
Functions§
- gc
- Perform garbage collection. Instances will not be removed from the heap until
NData::gc()is called. - init
- Initialize global storage of data. Call only once at startup.
- mirror
- Mirror global storage of data from another process. Call only once at startup.
- print_
heap - Prints the objects currently stored in the heap