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.
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.
Handle to a flatdata struct for read-only fields access.
Mutable handle to a flatdata struct for reading and writing fields.
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
Hierarchical Resource Storage
A type in flatdata used for reading data.
A mutable type in flatdata used for writing data.
A type used as element of
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