Obj.Ephemeron(3) OCaml library Obj.Ephemeron(3)

# [NAME](#NAME)

Obj.Ephemeron - no description

# [Module](#Module)

Module Obj.Ephemeron

# [Documentation](#Documentation)

Module **Ephemeron**  
: **sig end**

Ephemeron with arbitrary arity and untyped

*type obj\_t* = **Obj.t**

alias for **Obj.t**

*type t*

an ephemeron cf **Obj.Ephemeron**

*val create* : **int -&gt; t**

**create n** returns an ephemeron with **n** keys. All the keys and the data are initially empty. The argument **n** must be between zero and **Obj.Ephemeron.max\_ephe\_length** (limits included).

*val length* : **t -&gt; int**

return the number of keys

*val get\_key* : **t -&gt; int -&gt; obj\_t option**

*val get\_key\_copy* : **t -&gt; int -&gt; obj\_t option**

*val set\_key* : **t -&gt; int -&gt; obj\_t -&gt; unit**

*val unset\_key* : **t -&gt; int -&gt; unit**

*val check\_key* : **t -&gt; int -&gt; bool**

*val blit\_key* : **t -&gt; int -&gt; t -&gt; int -&gt; int -&gt; unit**

*val get\_data* : **t -&gt; obj\_t option**

*val get\_data\_copy* : **t -&gt; obj\_t option**

*val set\_data* : **t -&gt; obj\_t -&gt; unit**

*val unset\_data* : **t -&gt; unit**

*val check\_data* : **t -&gt; bool**

*val blit\_data* : **t -&gt; t -&gt; unit**

*val max\_ephe\_length* : **int**

Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain

2026-09-04 OCamldoc

---

Document: Obj.Ephemeron(3o) from ocaml 5.5.1-r0 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
