Crate contigious_tree
source ·Expand description
Write and read tree graphs to and from contigious blocks of memory.
Structs
- Iterates over the individual root nodes of subtrees
- 32 Bit signed integer stored in little endian byte order
- Serializes a tree data structure in a depth first manner.
- Each subtree is contigious in memory and can borrowed independently similarly to a slice of bytes.
- An owned tree, which is stored in contigious memory. Fast traversal and query times.
- 8 Bit unsigned integer stored in little endian byte order
Traits
TreeVec
is generic over the value types associated with each node. Furthermore it is also generic about the way these are serialized. E.g. A value type ofi64
could be stored in little endian, big endian or a bitpacked representation. This allows us to adapt the tree to a wide variaty of usecases.
Type Definitions
- Used to store the binary sizes of
TreeVec
s andTreeSlice
s in bytes. This would usually be done utilizingusize
, yet the size ofusize
is platform dependend. Since part of the appeal of a serializable tree data structure is to store it to a filesystem and load it, it seems beneficial to fix this to 64Bit on any platform to not introduce a dependency of the fileformat to the platform it has been generated on.