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
.
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
val sexp_of_seek : seek ‑> Base.Sexp.t
val sexp_of_no_seek : no_seek ‑> Base.Sexp.t
type ('data_perm_read_write, 'seek_permission) t
= ('data_perm_read_write, 'seek_permission) Core__Iobuf.t
val invariant : 'a Base__.Invariant_intf.inv ‑> 'b Base__.Invariant_intf.inv ‑> ('a, 'b) t Base__.Invariant_intf.inv
module Window = Core__Iobuf.Window
module Limits = Core__Iobuf.Limits
module Hexdump = Core__Iobuf.Hexdump
module Debug = Core__Iobuf.Debug
val create : len:int ‑> ('a, 'b) t
val of_bigstring : ?pos:int ‑> ?len:int ‑> Core__.Import.Bigstring.t ‑> ([< Core__.Import.read_write ], 'a) t
val of_string : string ‑> ('a, 'b) t
val set_bounds_and_buffer : src:([> Core__.Import.write ] as a, 'b) t ‑> dst:('a, seek) t ‑> unit
val set_bounds_and_buffer_sub : pos:int ‑> len:int ‑> src:([> Core__.Import.write ] as a, 'b) t ‑> dst:('a, seek) t ‑> unit
val read_only : ([> Core__.Import.read ], 's) t ‑> (Core__.Import.read, 's) t
val capacity : ('a, 'b) t ‑> int
val length : ('a, 'b) t ‑> int
val is_empty : ('a, 'b) t ‑> bool
module type Bound : sig ... end
module Lo_bound = Core__Iobuf.Lo_bound
module Hi_bound = Core__Iobuf.Hi_bound
val bounded_flip_lo : ('a, seek) t ‑> Lo_bound.t ‑> unit
val compact : (Core__.Import.read_write, seek) t ‑> unit
val bounded_compact : (Core__.Import.read_write, seek) t ‑> Lo_bound.t ‑> Hi_bound.t ‑> unit
val bounded_flip_hi : ('a, seek) t ‑> Hi_bound.t ‑> unit
val to_string : ?len:int ‑> ([> Core__.Import.read ], 'a) t ‑> string
val to_string_hum : ?max_lines:int ‑> ('a, 'b) t ‑> string
module Consume = Core__Iobuf.Consume
module Fill = Core__Iobuf.Fill
module Peek = Core__Iobuf.Peek
module Poke = Core__Iobuf.Poke
module Unsafe = Core__Iobuf.Unsafe
val crc32 : ([> Core__.Import.read ], 'a) t ‑> Core__.Import.Int63.t
val fill_bin_prot : ([> Core__.Import.write ], seek) t ‑> 'a Bin_prot.Type_class.writer ‑> 'a ‑> unit Core__.Import.Or_error.t
val consume_bin_prot : ([> Core__.Import.read ], seek) t ‑> 'a Bin_prot.Type_class.reader ‑> 'a Core__.Import.Or_error.t
module Blit = Core__Iobuf.Blit
module Blit_consume = Core__Iobuf.Blit_consume
module Blit_fill = Core__Iobuf.Blit_fill
val sexp_of_ok_or_eof : ok_or_eof ‑> Base.Sexp.t
val input : ([> Core__.Import.write ], seek) t ‑> Core__.Import.In_channel.t ‑> ok_or_eof
val read : ([> Core__.Import.write ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> ok_or_eof
val read_assume_fd_is_nonblocking : ([> Core__.Import.write ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> Core__.Syscall_result.Unit.t
val pread_assume_fd_is_nonblocking : ([> Core__.Import.write ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> offset:int ‑> unit
val recvfrom_assume_fd_is_nonblocking : ([> Core__.Import.write ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> Core.Iobuf_intf.Unix.sockaddr
val recvmmsg_assume_fd_is_nonblocking : (Core.Iobuf_intf.Unix.File_descr.t ‑> Recvmmsg_context.t ‑> Core.Iobuf_intf.Unix.Syscall_result.Int.t) Core__.Import.Or_error.t
val send_nonblocking_no_sigpipe : unit ‑> (([> Core__.Import.read ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> Core.Iobuf_intf.Unix.Syscall_result.Unit.t) Core__.Import.Or_error.t
val sendto_nonblocking_no_sigpipe : unit ‑> (([> Core__.Import.read ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> Core.Iobuf_intf.Unix.sockaddr ‑> Core.Iobuf_intf.Unix.Syscall_result.Unit.t) Core__.Import.Or_error.t
val output : ([> Core__.Import.read ], seek) t ‑> Core__.Import.Out_channel.t ‑> unit
val write : ([> Core__.Import.read ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> unit
val write_assume_fd_is_nonblocking : ([> Core__.Import.read ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> unit
val pwrite_assume_fd_is_nonblocking : ([> Core__.Import.read ], seek) t ‑> Core.Iobuf_intf.Unix.File_descr.t ‑> offset:int ‑> unit
module Expert = Core__Iobuf.Expert
val check_invariant : bool Core__.Import.ref
val show_messages : bool Core__.Import.ref