Up

Module Consume

Consume.string t ~len reads len characters (all, by default) from t into a new string and advances the lower bound of the window accordingly.

Consume.bin_prot X.bin_read_t t returns the initial X.t in t, advancing past the bytes read.

Signature

type src = (Core_kernel.Std.read, seek) t

To_string.blito ~src ~dst ~dst_pos ~src_len () reads src_len bytes from src, advancing src's window accordingly, and writes them into dst starting at dst_pos. By default dst_pos = 0 and src_len = length src. It is an error if dst_pos and src_len don't specify a valid region of dst or src_len > length src.

module To_string : Iobuf_intf.Consuming_blit with type src := src with type dst := string
include Iobuf_intf.Accessors with type ('a, 'r, 's) t = ( ([> ] as 'r) , seek) t -> 'a with type 'a bin_prot := 'a Core_kernel.Std.Bin_prot.Type_class.reader
type ('a, 'r, 's) t = ( ([> ] as 'r) , seek) t -> 'a

('d, 'w) Iobuf.t accessor function manipulating 'a, either writing it to the iobuf or reading it from the iobuf.

type 'a bin_prot
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 uint64_be : (int, 'd, 'w) t
val uint64_le : (int, 'd, 'w) t
val int64_t_be : (Core_kernel.Std.Int64.t, 'd, 'w) t
val int64_t_le : (Core_kernel.Std.Int64.t, 'd, 'w) t
val head_padded_fixed_string : padding:char -> len:int -> (string, 'd, 'w) t
val tail_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 -> (Core_kernel.Std.Bigstring.t, 'd, 'w) t
val bin_prot : 'a bin_prot -> ('a, 'd, 'w) t
val int64_be_trunc : (int, 'd, 'w) t
val int64_le_trunc : (int, 'd, 'w) t