package serde

  1. Overview
  2. Docs
type 'buffer reader = {
  1. inner : 'buffer;
  2. pos : 'buffer -> int;
  3. next : 'buffer -> char option;
  4. peek : 'buffer -> char option;
  5. drop : 'buffer -> unit;
  6. read_to_end : 'buffer -> string;
  7. skip_whitespace : 'buffer -> unit;
}
type t
val pos : t -> int
val next : t -> char option
val peek : t -> char option
val drop : t -> unit
val read_to_end : t -> string
val skip_whitespace : t -> unit
val make : 'buffer reader -> t

create a new reader from a custom implementation of the reader interface.

val from_string : string -> t

create a new reader from an in-memory string

OCaml

Innovation. Community. Security.