Module CCHashTrie.Transient
Transient Identifiers
type t
Identifiers for transient modifications. A transient modification is uniquely identified by a
Transient.t
. OnceTransient.freeze r
is called,r
cannot be used to modify the structure again.
val create : unit -> t
Create a new, active ID.
val frozen : t -> bool
frozen i
returnstrue
iffreeze i
was called before. In this case, the ID cannot be used for modifications again.
val active : t -> bool
active i
isnot (frozen i)
.
val freeze : t -> unit
freeze i
makesi
unusable for new modifications. The values created withi
will now be immutable.
val with_ : (t -> 'a) -> 'a
with_ f
creates a transient IDi
, callsf i
, freezes the IDi
and returns the result off i
.