Module grin_store::types

source ·
Expand description

Common storage-related types

Structs§

  • Wrapper for a file that can be read at any position (random read) but for which writes are append only. Reads are backed by a memory map (mmap(2)), relying on the operating system for fast access and caching. The memory map is reallocated to expand it when new writes are flushed.
  • Data file (MMR) wrapper around an append-only file.
  • Represents a single entry in the size_file. Offset (in bytes) and size (in bytes) of a variable sized entry in the corresponding data_file. i.e. To read a single entry from the data_file at position p, read the entry in the size_file to obtain the offset (and size) and then read those bytes from the data_file.

Enums§

  • Are we dealing with “fixed size” data or “variable size” data in a data file?