Common definitions used by binary protocol converters
Position within buffers
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
.
Invalid_argument
if the designated ranges are invalid.
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
.
Invalid_argument
if the designated ranges are invalid.
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
.
Invalid_argument
if the designated ranges are invalid.
Buffer too short for read/write operation
Used internally for backtracking
#
| Neg_int8
| (* | Negative integer was positive or zero | *) |
#
| Int_code
| (* | Unknown integer code while reading integer | *) |
#
| Int_overflow
| (* | Overflow reading integer | *) |
#
| Nat0_code
| (* | Unknown integer code while reading natural number | *) |
#
| Nat0_overflow
| (* | Overflow reading natural number | *) |
#
| Int32_code
| (* | Unknown integer code while reading 32bit integer | *) |
#
| Int64_code
| (* | Unknown integer code while reading 64bit integer | *) |
#
| Nativeint_code
| (* | Unknown integer code while reading native integer | *) |
#
| Unit_code
| (* | Illegal unit value | *) |
#
| Bool_code
| (* | Illegal boolean value | *) |
#
| Option_code
| (* | Illegal option code | *) |
#
| String_too_long
| (* | String too long | *) |
#
| Variant_tag
| (* | Untagged integer encoding for variant tag | *) |
#
| Array_too_long
| (* | Array too long | *) |
#
| Hashtbl_too_long
| (* | Hashtable too long | *) |
#
| Sum_tag of string
| (* | Illegal sum tag for given type | *) |
#
| Variant of string
| (* | Illegal variant for given type | *) |
#
| Poly_rec_bound of string
| (* | Attempt to read data bound through polymorphic record fields | *) |
#
| Variant_wrong_type of string
| (* | Unexpected attempt to read variant with given non-variant type | *) |
#
| Silly_type of string
| (* | Silly_type type_name indicates unhandled but silly case
where a type of the sort type 'a type_name = 'a is used
with a polymorphic variant as type parameter and included
in another polymorphic variant type. | *) |
#
| Empty_type of string
| (* | Attempt to read data that corresponds to an empty type. | *) |
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_concurrent_modification loc
Failure
if a binary writer
detects a concurrent change to the underlying data structure.
array_bound_error ()