(** Core types for Lithos *) (** Phantom type for read-only transactions *) type ro (** Phantom type for read-write transactions *) type rw type page_id = int64 type metadata = { version : int ; page_size : int ; root_bucket : page_id option } type txn_state = | Active | Committed | Rolled_back (** Key type - represented as bytes for efficient binary key handling *) type key = bytes (** Value type - opaque Bigarray slice for zero-copy access to mmap'd data. Values are only valid during the lifetime of the transaction that created them. If you need a value to outlive the transaction, copy it with {!bytes_of_value}. *) type value = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t val key_of_string : string -> key val string_of_key : key -> string val value_of_string : string -> value val string_of_value : value -> string val value_of_bytes : bytes -> value val bytes_of_value : value -> bytes