Runtime\_events.Type(3) OCaml library Runtime\_events.Type(3)

# [NAME](#NAME)

Runtime\_events.Type - no description

# [Module](#Module)

Module Runtime\_events.Type

# [Documentation](#Documentation)

Module **Type**  
: **sig end**

*type* **'a** *t*

The type for a user event content type.

*val unit* : **unit t**

An event that has no data associated with it.

*type span* =  
| Begin  
| End

*val span* : **span t**

An event that has a beginning and an end.

*val int* : **int t**

An event containing an integer value.

*val register* : **encode:(bytes -&gt; 'a -&gt; int) -&gt;** **decode:(bytes -&gt; int -&gt; 'a) -&gt; 'a t**

Registers a custom type by providing an encoder and a decoder. The encoder writes the value in the provided buffer and returns the number of bytes written. The decoder gets a slice of the buffer of specified length, and returns the decoded value.

The maximum value length is 1024 bytes.

2026-10-01 OCamldoc

---

Document: Runtime_events.Type(3o) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
