Module Core__Iobuf.Expert

The Expert module is for building efficient out-of-module Iobuf abstractions.

val buf : (__t ‑> Core__.Import.Bigstring.t

These accessors will not allocate, and are mainly here to assist in building low-cost syscall wrappers.

One must be careful to avoid writing out of the limits (between lo_min and hi_max) of the buf. Doing so would violate the invariants of the parent Iobuf.

val hi_max : (__t ‑> int
val hi : (__t ‑> int
val lo : (__t ‑> int
val lo_min : (__t ‑> int
val to_bigstring_shared : ?pos:int ‑> ?len:int ‑> (__t ‑> Core__.Import.Bigstring.t

to_bigstring_shared t and to_iobuf_shared t allocate new wrappers around the storage of buf t, relative to t's current bounds.

These operations allow access outside the bounds and limits of t, and without respect to its read/write access. Be careful not to violate t's invariants.

val to_iovec_shared : ?pos:int ‑> ?len:int ‑> (__t ‑> Core__.Import.Bigstring.t Core.Iobuf_intf.Unix.IOVec.t
val set_bounds_and_buffer : src:('data_t ‑> dst:('dataseekt ‑> unit

These versions of set_bounds_and_buffer allow ~src to be read-only. ~dst will be writable through ~src aliases even though the type does not reflect this!

val set_bounds_and_buffer_sub : pos:int ‑> len:int ‑> src:('data_t ‑> dst:('dataseekt ‑> unit