Common definitions used by binary protocol converters
check_next buf pos
pos
exceeds the length of buffer buf
.safe_get_pos buf pos_ref
pos_ref
within buffer buf
.val blit_string_buf : ?src_pos:int ‑> string ‑> ?dst_pos:int ‑> buf ‑> len:int ‑> unit
blit_string_buf ?src_pos src ?dst_pos dst ~len
blits len
bytes of the source string src
starting at position src_pos
to buffer dst
starting at position dst_pos
.
val blit_bytes_buf : ?src_pos:int ‑> bytes ‑> ?dst_pos:int ‑> buf ‑> len:int ‑> unit
blit_bytes_buf ?src_pos src ?dst_pos dst ~len
blits len
bytes of the source byte sequence src
starting at position src_pos
to buffer dst
starting at position dst_pos
.
val blit_buf_string : ?src_pos:int ‑> buf ‑> ?dst_pos:int ‑> bytes ‑> len:int ‑> unit
blit_buf_string ?src_pos src ?dst_pos dst ~len
blits len
bytes of the source buffer src
starting at position src_pos
to string dst
starting at position dst_pos
.
val blit_buf_bytes : ?src_pos:int ‑> buf ‑> ?dst_pos:int ‑> bytes ‑> len:int ‑> unit
blit_buf_bytes ?src_pos src ?dst_pos dst ~len
blits len
bytes of the source buffer src
starting at position src_pos
to byte sequence dst
starting at position dst_pos
.
blit_buf ?src_pos ~src ?dst_pos ~dst len
blits len
bytes of the
source buffer src
starting at position src_pos
to destination
buffer dst
starting at position dst_pos
.
module ReadError : sig ... end
exception
Poly_rec_write of string
PolyRecWrite type
gets raised when the user attempts to write or
estimate the size of a value of a type that is bound through a
polymorphic record field in type definition type
.
exception
Empty_type of string
EmptyType
gets raised when the user attempts to write or estimate
the size of a value of an empty type, which would not make sense.
val raise_concurrent_modification : string ‑> 'a
raise_concurrent_modification loc
val copy_htbl_list : ('a, 'b) Hashtbl.t ‑> ('a * 'b) list ‑> ('a, 'b) Hashtbl.t
copy_htbl_list htbl lst
adds all (key, value)
pairs in lst
to hash table htbl
.
external unsafe_blit_string_buf : src_pos:int ‑> string ‑> dst_pos:int ‑> buf ‑> len:int ‑> unit = "bin_prot_blit_string_buf_stub"
external unsafe_blit_bytes_buf : src_pos:int ‑> bytes ‑> dst_pos:int ‑> buf ‑> len:int ‑> unit = "bin_prot_blit_bytes_buf_stub"
external unsafe_blit_buf_string : src_pos:int ‑> buf ‑> dst_pos:int ‑> bytes ‑> len:int ‑> unit = "bin_prot_blit_buf_bytes_stub"
external unsafe_blit_buf_bytes : src_pos:int ‑> buf ‑> dst_pos:int ‑> bytes ‑> len:int ‑> unit = "bin_prot_blit_buf_bytes_stub"
external unsafe_blit_float_array_buf : src_pos:int ‑> float array ‑> dst_pos:int ‑> buf ‑> len:int ‑> unit = "bin_prot_blit_float_array_buf_stub"
external unsafe_blit_buf_float_array : src_pos:int ‑> buf ‑> dst_pos:int ‑> float array ‑> len:int ‑> unit = "bin_prot_blit_buf_float_array_stub"