Pkt_line.Encoder
val create : unit -> encoder
val pp_error : error Fmt.t
type 'err state =
| Write of {
buffer : string;
off : int;
len : int;
continue : int -> 'err state;
}
| Error of 'err
| Done
val write : encoder -> string -> unit
write e s
writes s
into e.payload
if there is enough space, i.e., Bytes.length e e.payload - e.pos > String.length s
. Otherwise, raises.
val blit : encoder -> buf:string -> off:int -> len:int -> unit