val create : unit -> ('k, 'd) tEphemeron.K1.create ()creates an ephemeron with one key. The data and the key are empty
val get_key : ('k, 'd) t -> 'k optionEphemeron.K1.get_key ephreturnsNoneif the key ofephis empty,Some x(wherexis the key) if it is full.
val get_key_copy : ('k, 'd) t -> 'k optionEphemeron.K1.get_key_copy ephreturnsNoneif the key ofephis empty,Some x(wherexis a (shallow) copy of the key) if it is full. This function has the same GC friendliness asWeak.get_copyIf the element is a custom block it is not copied.
val set_key : ('k, 'd) t -> 'k -> unitEphemeron.K1.set_key eph elsets the key ofephto be a (full) key toel
val unset_key : ('k, 'd) t -> unitEphemeron.K1.unset_key eph elsets the key ofephto be an empty key. Since there is only one key, the ephemeron starts behaving like a reference on the data.
val check_key : ('k, 'd) t -> boolEphemeron.K1.check_key ephreturnstrueif the key of theephis full,falseif it is empty. Note that even ifEphemeron.K1.check_key ephreturnstrue, a subsequentEphemeron.K1.get_keyephcan returnNone.
val blit_key : ('k, _) t -> ('k, _) t -> unitEphemeron.K1.blit_key eph1 eph2sets the key ofeph2with the key ofeph1. Contrary to usingEphemeron.K1.get_keyfollowed byEphemeron.K1.set_keyorEphemeron.K1.unset_keythis function does not prevent the incremental GC from erasing the value in its current cycle.
val get_data : ('k, 'd) t -> 'd optionEphemeron.K1.get_data ephreturnsNoneif the data ofephis empty,Some x(wherexis the data) if it is full.
val get_data_copy : ('k, 'd) t -> 'd optionEphemeron.K1.get_data_copy ephreturnsNoneif the data ofephis empty,Some x(wherexis a (shallow) copy of the data) if it is full. This function has the same GC friendliness asWeak.get_copyIf the element is a custom block it is not copied.
val set_data : ('k, 'd) t -> 'd -> unitEphemeron.K1.set_data eph elsets the data ofephto be a (full) data toel
val unset_data : ('k, 'd) t -> unitEphemeron.K1.unset_data eph elsets the key ofephto be an empty key. The ephemeron starts behaving like a weak pointer.
val check_data : ('k, 'd) t -> boolEphemeron.K1.check_data ephreturnstrueif the data of theephis full,falseif it is empty. Note that even ifEphemeron.K1.check_data ephreturnstrue, a subsequentEphemeron.K1.get_dataephcan returnNone.
val blit_data : (_, 'd) t -> (_, 'd) t -> unitEphemeron.K1.blit_data eph1 eph2sets the data ofeph2with the data ofeph1. Contrary to usingEphemeron.K1.get_datafollowed byEphemeron.K1.set_dataorEphemeron.K1.unset_datathis function does not prevent the incremental GC from erasing the value in its current cycle.
module Make : functor (H : Stdlib.Hashtbl.HashedType) -> S with type key = H.tFunctor building an implementation of a weak hash table
module MakeSeeded : functor (H : Stdlib.Hashtbl.SeededHashedType) -> SeededS with type key = H.tFunctor building an implementation of a weak hash table. The seed is similar to the one of
Hashtbl.MakeSeeded.