aboutsummaryrefslogtreecommitdiff
path: root/lib/stream.ml
diff options
context:
space:
mode:
authorClombrong <cromblong@egregore.fun>2025-06-17 20:55:59 +0200
committerClombrong <cromblong@egregore.fun>2025-06-17 20:55:59 +0200
commit0c8f92a24ce0e4d6e954b70e29c89ec874592bc5 (patch)
treeb70d2c20b118087be880ac62b1c5882160f5dfb1 /lib/stream.ml
parent4da55bcedf111f3d0fbaf1e1b8eb3dfa51488348 (diff)
docs(stream): docstring get wrapper
Diffstat (limited to 'lib/stream.ml')
-rw-r--r--lib/stream.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index 677b60d..b26d02f 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -4,6 +4,9 @@ exception ClosedStream
exception InvalidStanza of string
let get stream =
+ (** [get stream] returns a promise containing an element of [stream].
+
+ If [stream] is closed, it throws a ClosedStream Lwt exception. *)
let* stanza = Lwt_stream.get stream
in match stanza with
| Some stanza -> Lwt.return stanza