Common definitions used by binary protocol converters
Reference to a position within buffers
create_buf n
creates a buffer of size n
.
buf_len buf
returns the length of buf
.
assert_pos pos
pos
is negative.
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
.
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
.
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
.
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
.
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.
raise_variant_wrong_type name pos
raise_concurrent_modification loc
copy_htbl_list htbl lst
adds all (key, value)
pairs in lst
to hash table htbl
.