Crate ndata

Source
Expand description

githubcrates-iodocs-rs


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§

pub use data::Data;
pub use usizemap::UsizeMap;

Modules§

data
dataarray
This module defines the DataArray struct, a thread-safe, reference-counted list-like data structure (Vec<Data>) stored in a shared heap.
databytes
dataobject
This module defines the DataObject struct, a thread-safe, reference-counted map-like data structure (HashMap<String, Data>) stored in a shared heap.
heap
json_util
sharedmutex
A shareable reader-writer spinlock mutex implementation. Original spinlock logic credit: Mikhail Panfilov Reader-writer lock logic adapted for this structure.
usizemap

Structs§

NDataConfig

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