sig
type no_seek
type seek = private Iobuf.no_seek
type (+'data_perm_read_write, +'seek_permission) t
val invariant :
'a Invariant.inv -> 'b Invariant.inv -> ('a, 'b) t Invariant.inv
val create : len:int -> ('a, 'b) Iobuf.t
val of_bigstring : ?pos:int -> ?len:int -> Bigstring.t -> ('a, 'b) Iobuf.t
val of_string : string -> ('a, 'b) Iobuf.t
val sub : ?pos:int -> ?len:int -> ('d, 'a) Iobuf.t -> ('d, 'b) Iobuf.t
val capacity : ('a, 'b) Iobuf.t -> int
val length : ('a, 'b) Iobuf.t -> int
val is_empty : ('a, 'b) Iobuf.t -> bool
val narrow : ('a, Iobuf.seek) Iobuf.t -> unit
module Snapshot :
sig
type t
val restore :
Iobuf.Snapshot.t -> ('a, Iobuf.seek) Iobuf.Snapshot.t -> unit
val sexp_of_t : Iobuf.Snapshot.t -> Sexplib.Sexp.t
end
val snapshot : ('a, Iobuf.seek) Iobuf.t -> Iobuf.Snapshot.t
val advance : ('a, Iobuf.seek) Iobuf.t -> int -> unit
val resize : ('a, Iobuf.seek) Iobuf.t -> len:int -> unit
val rewind : ('a, Iobuf.seek) Iobuf.t -> unit
val reset : ('a, Iobuf.seek) Iobuf.t -> unit
val flip : ('a, Iobuf.seek) Iobuf.t -> unit
val compact : (Common.read_write, Iobuf.seek) Iobuf.t -> unit
val to_string : ?len:int -> ('a, 'b) Iobuf.t -> string
val consume_into_string :
?pos:int -> ?len:int -> ('a, Iobuf.seek) Iobuf.t -> string -> unit
val consume_into_bigstring :
?pos:int -> ?len:int -> ('a, Iobuf.seek) Iobuf.t -> Bigstring.t -> unit
module Consume :
sig
type ('a, 'd, 'w) t = ('d, seek) t -> 'a
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string : padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Fill :
sig
type ('a, 'd, 'w) t = (Common.read_write, seek) t -> 'a -> unit
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string : padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Peek :
sig
type ('a, 'd, 'w) t = ('d, 'w) t -> pos:int -> 'a
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string : padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Poke :
sig
type ('a, 'd, 'w) t =
(Common.read_write, 'w) t -> pos:int -> 'a -> unit
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string : padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Unsafe :
sig
module Consume :
sig
type ('a, 'd, 'w) t = ('d, seek) t -> 'a
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string :
padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Fill :
sig
type ('a, 'd, 'w) t = (Common.read_write, seek) t -> 'a -> unit
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string :
padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Peek :
sig
type ('a, 'd, 'w) t = ('d, 'w) t -> pos:int -> 'a
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string :
padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
module Poke :
sig
type ('a, 'd, 'w) t =
(Common.read_write, 'w) t -> pos:int -> 'a -> unit
val char : (char, 'd, 'w) t
val int8 : (int, 'd, 'w) t
val int16_be : (int, 'd, 'w) t
val int16_le : (int, 'd, 'w) t
val int32_be : (int, 'd, 'w) t
val int32_le : (int, 'd, 'w) t
val uint8 : (int, 'd, 'w) t
val uint16_be : (int, 'd, 'w) t
val uint16_le : (int, 'd, 'w) t
val uint32_be : (int, 'd, 'w) t
val uint32_le : (int, 'd, 'w) t
val int64_be : (int, 'd, 'w) t
val int64_le : (int, 'd, 'w) t
val int64_t_be : (Int64.t, 'd, 'w) t
val int64_t_le : (Int64.t, 'd, 'w) t
val padded_fixed_string :
padding:char -> len:int -> (string, 'd, 'w) t
val string : ?str_pos:int -> ?len:int -> (string, 'd, 'w) t
val bigstring : ?str_pos:int -> ?len:int -> (Bigstring.t, 'd, 'w) t
end
end
val fill_bin_prot :
(Common.read_write, Iobuf.seek) Iobuf.t ->
'a Bin_prot.Type_class.writer -> 'a -> unit Or_error.t
val consume_bin_prot :
('b, Iobuf.seek) Iobuf.t ->
'a Bin_prot.Type_class.reader -> 'a Or_error.t
val transfer :
?len:int ->
src:('a, Iobuf.seek) Iobuf.t ->
dst:(Common.read_write, Iobuf.seek) Iobuf.t -> unit
val memmove :
(Common.read_write, 'a) Iobuf.t ->
src_pos:int -> dst_pos:int -> len:int -> unit
val read_assume_fd_is_nonblocking :
(Common.read_write, Iobuf.seek) Iobuf.t ->
Iobuf_intf.Unix.File_descr.t -> int
val pread_assume_fd_is_nonblocking :
(Common.read_write, Iobuf.seek) Iobuf.t ->
Iobuf_intf.Unix.File_descr.t -> offset:int -> int
val recvfrom_assume_fd_is_nonblocking :
(Common.read_write, Iobuf.seek) Iobuf.t ->
Iobuf_intf.Unix.File_descr.t -> int * Iobuf_intf.Unix.sockaddr
val recvmmsg_assume_fd_is_nonblocking :
(Iobuf_intf.Unix.File_descr.t ->
?count:int ->
?srcs:Iobuf_intf.Unix.sockaddr array ->
(Common.read_write, Iobuf.seek) Iobuf.t array -> int)
Or_error.t
val send_nonblocking_no_sigpipe :
unit ->
(('a, Iobuf.seek) Iobuf.t -> Iobuf_intf.Unix.File_descr.t -> int option)
Or_error.t
val sendto_nonblocking_no_sigpipe :
unit ->
(('a, Iobuf.seek) Iobuf.t ->
Iobuf_intf.Unix.File_descr.t -> Iobuf_intf.Unix.sockaddr -> int option)
Or_error.t
val write_assume_fd_is_nonblocking :
('a, Iobuf.seek) Iobuf.t -> Iobuf_intf.Unix.File_descr.t -> int
val pwrite_assume_fd_is_nonblocking :
('a, Iobuf.seek) Iobuf.t ->
Iobuf_intf.Unix.File_descr.t -> offset:int -> int
val sexp_of_no_seek : Iobuf.no_seek -> Sexplib.Sexp.t
val sexp_of_seek : Iobuf.seek -> Sexplib.Sexp.t
val sexp_of_t :
('data_perm_read_write -> Sexplib.Sexp.t) ->
('seek_permission -> Sexplib.Sexp.t) ->
('data_perm_read_write, 'seek_permission) Iobuf.t -> Sexplib.Sexp.t
end