package capnp

  1. Overview
  2. Docs
OCaml code generation plugin for the Cap'n Proto serialization framework

Install

Dune Dependency

Authors

Maintainers

Sources

capnp-v3.4.0.tbz
sha256=7a6b0e4dbbe6d246336f248c69f719fd372bb8d51805822ea123983c3181c17e
sha512=d8ecf1d6481edab02fd8cc7dc269ee0c357a1858f4434adacdd1f2af9d528c7304e3e467faa1273ebb8f6a452b80b5822cbddfcc4534229bd0edca24a70a5833

doc/capnp/Capnp/Codecs/index.html

Module Capnp.CodecsSource

Sourcetype compression_t = [
  1. | `None
  2. | `Packing
]
Sourcemodule FramingError : sig ... end
Sourcemodule FramedStream : sig ... end
Sourceval serialize_fold : 'cap Message.BytesMessage.Message.t -> compression:compression_t -> init:'acc -> f:('acc -> string -> 'acc) -> 'acc

serialize_fold message ~compression ~init ~f generates an ordered sequence of string fragments corresponding to a Cap'n Proto framed message, encoded using the specified compression method. The return value is the result of folding f across the resulting sequence of fragments.

Sourceval serialize_iter : 'cap Message.BytesMessage.Message.t -> compression:compression_t -> f:(string -> unit) -> unit

serialize_iter message ~compression ~f generates an ordered sequence of string fragments corresponding to a Cap'n Proto framed message, encoded using the specified compression method. f is applied to each fragment in turn.

Sourceval serialize : compression:compression_t -> 'cap Message.BytesMessage.Message.t -> string

serialize ~compression message constructs a string containing the message segments prefixed with the serialization framing header, encoded using the specified compression method.

OCaml

Innovation. Community. Security.