Implementation of heremaps/flatdata in Rust.
Flatdata is a library providing data structures for convenient creation, storage and access of packed memory-mappable structures with minimal overhead.
The idea is, that the user defines a schema of the data format using flatdata's very simple schema language supporting plain structs, vectors and multivectors. The schema is then used to generate builders and readers for serialization and deserialization of the data. The data is serialized in a portable way which allows zero-overhead random access to it by using memory mapped storage. Memory mapped approach makes it possible to use the operating system facilities for loading, caching and paging of the data, and most important, accessing it as if it were in memory. Read more in "Why flatdata?".
This create provides:
- macros for generated code (prefixed with
- macros for zero-cost serialization
write_bytes, * in-memory
FileResourceStoragestorages, * data structures for writing data:
- data structures for reading data:
The generator is part of the main heremaps/flatdata repository.
Module containing helper traits and macros.
Primitive traits and types representing basic properties of types.
Macro used by generator to define a flatdata archive and corresponding archive builder.
Macro used by generator to define a flatdata index.
Macro used by generator to define a flatdata struct.
Macro used by generator to define a flatdata variant used in
Reads specified number of bits from data at specified offset in portable way.
Writes specified number of bits of a given value to a slice at a specified offset in portable way.
A read-only view on a contiguous sequence of flatdata structs of the same
Vector which flushes its content when growing.
Resource storage on disk using memory mapped files.
Describes a chunk of memory
Resource storage in memory.
A read-only view on a multivector.
A container for writing an indexed sequence of heterogeneous data items.
A container holding a single flatdata struct in memory, and providing read and write access to it.
A container holding a contiguous sequence of flatdata structs of the same
Error indicating failures when reading and writing data from/to a
A flatdata archive representing serialized data.
A flatdata archive builder for serializing data.
A type in archive used as index of a
A type in archive used as mutable index of a
A specialized Struct factory producing Index items. Used primarily by the MultiVector/MultiArrayView.
A type in flatdata used for reading data.
A mutable type in flatdata used for writing data.
Hierarchical Resource Storage
A factory trait used to bind lifetime to Ref implementations.
A type used as element of
A type used to create VariadicStructs.
Creates a new archive in resource storage.
Helper for creating an external vector in the given resource storage.
Helper for creating a multivector in the given resource storage.
Index specifying a variadic type of