Bigstring IO helpers
include module type of sig ... end
val create : int ‑> t
val length : t ‑> int
val blit_string_t : src:string ‑> src_pos:int ‑> dst:t ‑> dst_pos:int ‑> len:int ‑> unit
val blit_t_bytes : src:t ‑> src_pos:int ‑> dst:Bytes.t ‑> dst_pos:int ‑> len:int ‑> unit
val sub_string : t ‑> pos:int ‑> len:int ‑> string
val index : t ‑> pos:int ‑> len:int ‑> char:char ‑> int option
val rindex : t ‑> pos:int ‑> len:int ‑> char:char ‑> int option
val with_temporary : size:int ‑> f:(t ‑> 'a) ‑> 'a
type ('a, 'b) fold_temporary_result
= ('a, 'b) Shexp_bigstring__Bigstring.fold_temporary_result
=
| Resize of {
}
| ||
| Continue of {
}
| ||
| Return of 'b |
val fold_temporary : size:int ‑> init:'a ‑> f:(t ‑> 'a ‑> ('a, 'b) fold_temporary_result) ‑> 'b
val write : Unix.file_descr ‑> t ‑> pos:int ‑> len:int ‑> int
val read : Unix.file_descr ‑> t ‑> pos:int ‑> len:int ‑> int
val read_all_interruptible : ?delay:float ‑> Unix.file_descr ‑> stop:(unit ‑> bool) ‑> read_all_interruptible_result
Same as read_all
except that stop
is called every delay
seconds until it returns
true
. In this case returns prematurely the data collected so far.