From 9efb32195a905de2d66ce29164cc22970833c2d7 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sun, 23 Aug 2026 17:03:40 +0000 Subject: Typed storage pointers --- lib/kernel/Storage.mli | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/kernel/Storage.mli') diff --git a/lib/kernel/Storage.mli b/lib/kernel/Storage.mli index 1148fba..9a10984 100644 --- a/lib/kernel/Storage.mli +++ b/lib/kernel/Storage.mli @@ -1,4 +1,13 @@ module Make : functor (S : Abstract.Storage.STORAGE) -> sig + module Pointer : sig + type 'a t + + val make : S.address -> (S.transaction -> S.address -> ('a, Concepts.Condition.condition) result) -> 'a t + val address_of : 'a t -> S.address + val swap : 'a t -> S.address -> 'a t + val deref : S.transaction -> 'a t -> ('a, Concepts.Condition.condition) result + end + val finish : S.transaction -> ('a, Concepts.Condition.condition) result -> ('a, Concepts.Condition.condition) result val with_transaction : S.connection -> (S.transaction -> ('a, Concepts.Condition.condition) result) -> ('a, Concepts.Condition.condition) result val store_blob : S.transaction -> Concepts.Blob.t -> (Concepts.Hash.hash, Concepts.Condition.condition) result -- cgit v1.2.3