Module Core.Iobuf_debug.Make

Make builds a module that is like Iobuf, except that the module also has some controls for whether the various Iobuf functions do invariant checking and/or show debug messages. Initially, the bool ref's are true.

The performance of the functions in the module resulting from Make can be much worse than that of a plain Iobuf, even with all the controls set to false.

Parameters

Signature

We use module type of struct include Iobuf end rather than module type of Iobuf so that the debugging functions work on normal Iobufs.

include module type of sig ... end
type seek = Iobuf_intf.seek
val sexp_of_seek : seek ‑> Sexplib.Sexp.t
type no_seek = Iobuf_intf.no_seek
val sexp_of_no_seek : no_seek ‑> Sexplib.Sexp.t
type ('data_perm_read_write, 'seek_permission) t = ('data_perm_read_write'seek_permissionCore__Iobuf.t
val create : len:int ‑> ('a'bt
val of_bigstring : ?pos:int ‑> ?len:int ‑> Core__.Import.Bigstring.t ‑> ([< Core__.Import.read_write ], 'at
val of_string : string ‑> ('a'bt
val sub_shared : ?pos:int ‑> ?len:int ‑> ('d'at ‑> ('d'bt
val set_bounds_and_buffer : src:([> Core__.Import.write ] as a, 'bt ‑> dst:('aseekt ‑> unit
val set_bounds_and_buffer_sub : pos:int ‑> len:int ‑> src:([> Core__.Import.write ] as a, 'bt ‑> dst:('aseekt ‑> unit
val read_only : ([> Core__.Import.read ], 'st ‑> (Core__.Import.read'st
val no_seek : ('r'at ‑> ('rno_seekt
val capacity : ('a'bt ‑> int
val length : ('a'bt ‑> int
val is_empty : ('a'bt ‑> bool
val narrow : ('aseekt ‑> unit
val narrow_lo : ('aseekt ‑> unit
val narrow_hi : ('aseekt ‑> unit
module type Bound : sig ... end
val advance : ('aseekt ‑> int ‑> unit
val unsafe_advance : ('aseekt ‑> int ‑> unit
val resize : ('aseekt ‑> len:int ‑> unit
val unsafe_resize : ('aseekt ‑> len:int ‑> unit
val rewind : ('aseekt ‑> unit
val reset : ('aseekt ‑> unit
val flip_lo : ('aseekt ‑> unit
val bounded_flip_lo : ('aseekt ‑> Lo_bound.t ‑> unit
val compact : (Core__.Import.read_writeseekt ‑> unit
val bounded_compact : (Core__.Import.read_writeseekt ‑> Lo_bound.t ‑> Hi_bound.t ‑> unit
val flip_hi : ('aseekt ‑> unit
val bounded_flip_hi : ('aseekt ‑> Hi_bound.t ‑> unit
val protect_window_and_bounds : ('rwno_seekt ‑> f:(('rwseekt ‑> 'a) ‑> 'a
val to_string : ?len:int ‑> ([> Core__.Import.read ], 'at ‑> string
val to_string_hum : ?max_lines:int ‑> ('a'bt ‑> string
val crc32 : ([> Core__.Import.read ], 'at ‑> Core__.Import.Int63.t
val bin_prot_length_prefix_bytes : int
val fill_bin_prot : ([> Core__.Import.write ], seekt ‑> 'a Bin_prot.Type_class.writer ‑> 'a ‑> unit Core__.Import.Or_error.t
val consume_bin_prot : ([> Core__.Import.read ], seekt ‑> 'a Bin_prot.Type_class.reader ‑> 'a Core__.Import.Or_error.t
type ok_or_eof = Core__Iobuf.ok_or_eof =
| Ok
| Eof
val sexp_of_ok_or_eof : ok_or_eof ‑> Sexplib.Sexp.t
val compare_ok_or_eof : ok_or_eof ‑> ok_or_eof ‑> int
val read_assume_fd_is_nonblocking : ([> Core__.Import.write ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> Core__.Syscall_result.Unit.t
val pread_assume_fd_is_nonblocking : ([> Core__.Import.write ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> offset:int ‑> unit
val recvfrom_assume_fd_is_nonblocking : ([> Core__.Import.write ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> Iobuf_intf.Unix.sockaddr
val output : ([> Core__.Import.read ], seekt ‑> Core__.Import.Out_channel.t ‑> unit
val write : ([> Core__.Import.read ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> unit
val write_assume_fd_is_nonblocking : ([> Core__.Import.read ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> unit
val pwrite_assume_fd_is_nonblocking : ([> Core__.Import.read ], seekt ‑> Iobuf_intf.Unix.File_descr.t ‑> offset:int ‑> unit
val check_invariant : bool Core__.Import.ref
val show_messages : bool Core__.Import.ref