package colombe

  1. Overview
  2. Docs
type decoder = {
  1. buffer : bytes;
  2. mutable pos : int;
  3. mutable max : int;
}
val pp : decoder Fmt.t
val io_buffer_size : int
val decoder : unit -> decoder
val decoder_from : string -> decoder
val end_of_input : decoder -> int
type error =
  1. | End_of_input
  2. | Expected_char of char
  3. | Unexpected_char of char
  4. | Expected_string of string
  5. | Invalid_command of string
  6. | Expected_eol
  7. | Expected_eol_or_space
  8. | No_enough_space
  9. | Assert_predicate of char -> bool
  10. | Invalid_code of int
val pp_error : error Fmt.t
type 'v state =
  1. | Ok of 'v
  2. | Read of {
    1. buffer : bytes;
    2. off : int;
    3. len : int;
    4. continue : int -> 'v state;
    }
  3. | Error of info
and info = {
  1. error : error;
  2. buffer : bytes;
  3. committed : int;
}
val safe : (decoder -> 'v state) -> decoder -> 'v state
val leave_with : decoder -> error -> 'a
val return : 'v -> decoder -> 'v state
val peek_char : decoder -> char option
val string : string -> decoder -> unit
val junk_char : decoder -> unit
val while1 : (char -> bool) -> decoder -> bytes * int * int
val at_least_one_line : decoder -> bool
val prompt : (decoder -> 'v state) -> decoder -> 'v state
val peek_while_eol : decoder -> bytes * int * int
val peek_while_eol_or_space : decoder -> bytes * int * int
OCaml

Innovation. Community. Security.