module IOVec: sig
.. end
I/O-vectors for scatter/gather-operations
type 'a
t = private {
|
buf : 'a ; |
|
pos : int ; |
|
len : int ; |
}
Representation of I/O-vectors.
NOTE: DO NOT CHANGE THE MEMORY LAYOUT OF THIS TYPE!!!
All C-functions in our bindings that handle I/O-vectors depend on it.
type 'a
kind
Kind of I/O-vector buffers
type
bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val string_kind : string kind
val bigstring_kind : bigstring kind
val empty : 'a kind -> 'a t
empty
the empty I/O-vector.
val of_string : ?pos:int -> ?len:int -> string -> string t
of_string ?pos ?len str
Raises Invalid_argument
if designated substring out of bounds.
Returns an I/O-vector designated by
position pos
and length len
in string str
.
pos
: default = 0
len
: default = String.length str - pos
val of_bigstring : ?pos:int ->
?len:int ->
bigstring -> bigstring t
of_bigstring ?pos ?len bstr
Raises Invalid_argument
if designated substring out of bounds.
Returns an I/O-vector designated by
position pos
and length len
in bigstring bstr
.
pos
: default = 0
len
: default = String.length str - pos
val drop : 'a t -> int -> 'a t
drop iovec n
drops n
characters from iovec
.
Raises Failure
if n
is greater than length of iovec
.
Returns resulting
I/O-vector.
val max_iovecs : int