Expand description
Type-erased data primitives that the rest of Intuicio is built on.
Intuicio moves values around without knowing their Rust types at compile
time, so every value is handled as raw bytes plus a type_hash::TypeHash
and a drop function. This crate provides the containers that do that:
data_stack- the stack and register storage used to pass values between function calls.lifetime- runtime borrow checking for values that outlive Rust’s static lifetimes.managed- reference counted and garbage collected value boxes.shared- thinRc<RefCell>/Arc<RwLock>wrappers.type_hash- cheap runtime type identity.
§Features
alloc-backtrace- print a backtrace on every allocation made through thenon_zero_*helpers.typehash_debug_name- keep the type name insidetype_hash::TypeHashfor readable diagnostics.
Modules§
- data_
stack - Type-erased stack that carries values between function calls.
- lifetime
- Runtime borrow checking for values Rust cannot track statically.
- managed
- Value boxes with runtime checked borrowing.
- shared
- Shared ownership wrappers with fallible, non-panicking access.
- type_
hash - Cheap runtime type identity.
Enums§
- Finalizer
- How an owning box drops the value it holds.
Traits§
- Destructor
- Drops a value whose type has no Rust counterpart.
- Finalize
- Drops a value through a raw pointer.
- Initialize
- Writes a default value through a raw pointer.
Functions§
- non_
zero_ ⚠alloc std::alloc::allocthat accepts zero-sized layouts.- non_
zero_ ⚠alloc_ zeroed std::alloc::alloc_zeroedthat accepts zero-sized layouts.- non_
zero_ ⚠dealloc std::alloc::dealloccounterpart ofnon_zero_alloc.- non_
zero_ ⚠realloc std::alloc::realloccounterpart ofnon_zero_alloc.- pointer_
alignment_ padding - Returns how many bytes must be skipped after
pointerto reach an address aligned toalignment.