package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Make_mutable_value(S)(V) constructs a Mutable_value for persisting a mutable value in a store. The module parameter S defines the location of the mutable value in the store, and the module parameter V contains information about the type of values that the constructed module will persist in the underlying store.

Parameters

module S : STORAGE_INFO
module V : VALUE

Signature

type 'a store = 'a t

The type of the store that is used for persisting data on disk.

type value = V.value

The type of the values that will be persisted.

val path_key : path

Path in the irmin tree.

val set : [> `Write ] store -> value -> unit Tezos_base.TzPervasives.tzresult Lwt.t

set store value persists value for this Mutable_value on store.

get store retrieves the value persisted in store for this Mutable_value. If the underlying storage backend fails to retrieve the contents of the mutable value by throwing an exception, then the exception is propagated by get store.

val find : [> `Read ] store -> value option Tezos_base.TzPervasives.tzresult Lwt.t

find store returns an optional value containing the value persisted in store for this Mutable_value. If no value is persisted for the Mutable_value, None is returned.

OCaml

Innovation. Community. Security.