Module Reader0.Internal
module State : sig ... endmodule Open_flags = Unix.Open_flagstype open_flags=[|`Already_closed|`Ok of Open_flags.t|`Error of exn]
val sexp_of_open_flags : open_flags -> Ppx_sexp_conv_lib.Sexp.t
type t={fd : Async_unix.Fd.t;id : Id.t;mutable buf : Core.Bigstring.t;mutable close_may_destroy_buf : [ `Yes | `Not_now | `Not_ever ];mutable pos : int;mutable available : int;mutable state : State.t;close_finished : unit Async_unix__.Import.Ivar.t;mutable last_read_time : Core.Time.t;open_flags : open_flags Async_unix__.Import.Deferred.t;}
val open_flags : t -> open_flags Async_unix__.Import.Deferred.tval last_read_time : t -> Core.Time.tval set_last_read_time : t -> Core.Time.t -> unitval close_finished : t -> unit Async_unix__.Import.Ivar.tval state : t -> State.tval set_state : t -> State.t -> unitval available : t -> intval set_available : t -> int -> unitval pos : t -> intval set_pos : t -> int -> unitval close_may_destroy_buf : t -> [ `Not_ever | `Not_now | `Yes ]val set_close_may_destroy_buf : t -> [ `Not_ever | `Not_now | `Yes ] -> unitval buf : t -> Core.Bigstring.tval set_buf : t -> Core.Bigstring.t -> unitval id : t -> Id.tval fd : t -> Async_unix.Fd.t
module Fields : sig ... endval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.tval io_stats : Async_unix.Io_stats.tval invariant : t -> unitval create : ?buf_len:Core_kernel__Int.t -> Async_unix.Fd.t -> tval of_in_channel : Core.In_channel.t -> Async_unix.Fd.Kind.t -> tval open_file : ?buf_len:Core_kernel__Int.t -> string -> t Async_kernel__Deferred.tval stdin : t lazy_tval close_finished : t -> unit Async_kernel__.Deferred0.tval is_closed : t -> boolval empty_buf : Core.Bigstring.tval destroy : t -> unitval close : t -> unit Async_kernel__.Deferred0.tval with_close : t -> f:(unit -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_unix__.Import.Monitor.Deferred.tval with_reader_exclusive : t -> (unit -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_kernel__Deferred.tval with_file : ?buf_len:Core_kernel__Int.t -> ?exclusive:bool -> string -> f:(t -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_kernel__Deferred.tval get_data : t -> [ `Eof | `Ok ] Async_unix__.Import.Deferred.tval ensure_buf_len : t -> at_least:Core_kernel__Int.t -> unitval get_data_until : t -> available_at_least:Core_kernel__Int.t -> [> `Eof of int | `Ok ] Async_kernel__Deferred.tval with_nonempty_buffer : t -> ([ `Eof | `Ok ] -> 'a) -> 'a Async_unix__.Import.Deferred.tval with_nonempty_buffer' : ?force_refill:bool -> t -> ([ `Eof | `Ok ] -> unit) -> unitval consume : t -> Core_kernel__Int.t -> unit
type 'a handle_chunk_result=[|`Stop of 'a|`Stop_consumed of 'a * int|`Continue|`Consumed of int * [ `Need of int | `Need_unknown ]]
val sexp_of_handle_chunk_result : a. ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a handle_chunk_result -> Ppx_sexp_conv_lib.Sexp.t
type 'a read_one_chunk_at_a_time_result=[|`Eof|`Stopped of 'a|`Eof_with_unconsumed_data of string]
val sexp_of_read_one_chunk_at_a_time_result : a. ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a read_one_chunk_at_a_time_result -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_consumed : consumed -> Ppx_sexp_conv_lib.Sexp.tval read_one_chunk_at_a_time : t -> handle_chunk:(Core.Bigstring.t -> pos:int -> len:int -> [< `Consumed of Core_kernel__Int.t * [ `Need of Core_kernel__Int.t | `Need_unknown ] | `Continue | `Stop of 'a | `Stop_consumed of 'a * Core_kernel__Int.t ] Async_unix__.Import.Deferred.t) -> [> `Eof | `Eof_with_unconsumed_data of Base.string | `Stopped of 'a ] Async_unix__.Import.Deferred.t
val sexp_of_handle_iobuf_result : a. ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a handle_iobuf_result -> Ppx_sexp_conv_lib.Sexp.tval read_one_iobuf_at_a_time : t -> handle_chunk:(([< Core__.Import.read_write ], 'a) Core.Iobuf.t -> [< `Continue | `Stop of 'b ] Async_kernel__Deferred.t) -> [> `Eof | `Eof_with_unconsumed_data of Base.string | `Stopped of 'b ] Async_unix__.Import.Deferred.t
module Read : functor (S : Core.Substring_intf.S) -> functor (Name : sig ... end) -> sig ... endmodule Read_substring : sig ... endval read_substring_available : t -> Core.Substring.t -> Core.Int.tval read_substring : t -> Core.Substring.t -> [> `Eof | `Ok of Core.Int.t ] Async_unix__.Import.Deferred.tval really_read_substring : t -> Core.Substring.t -> [> `Eof of int | `Ok ] Async_unix__.Import.Deferred.t
module Read_bigsubstring : sig ... endval read_bigsubstring : t -> Core.Bigsubstring.t -> [> `Eof | `Ok of Core.Int.t ] Async_unix__.Import.Deferred.tval really_read_bigsubstring : t -> Core.Bigsubstring.t -> [> `Eof of int | `Ok ] Async_unix__.Import.Deferred.tval really_read_bigstring : t -> Core.Bigsubstring.base -> [> `Eof of int | `Ok ] Async_unix__.Import.Deferred.tval peek_available : t -> len:Core.Int.t -> Base.stringval peek : t -> len:Core_kernel__Int.t -> [> `Eof | `Ok of Base.string ] Async_kernel__Deferred.tval read_available : t -> ?pos:Core_kernel__.Import.int -> ?len:Core_kernel__.Import.int -> Core.Substring.base -> Core.Int.tval read : t -> ?pos:Core_kernel__.Import.int -> ?len:Core_kernel__.Import.int -> Core.Substring.base -> [> `Eof | `Ok of Core.Int.t ] Async_unix__.Import.Deferred.tval really_read : t -> ?pos:Core_kernel__.Import.int -> ?len:Core_kernel__.Import.int -> Core.Substring.base -> [> `Eof of int | `Ok ] Async_unix__.Import.Deferred.tval read_char : t -> [> `Eof | `Ok of Core_kernel__.Import.char ] Async_unix__.Import.Deferred.tval first_char : t -> [< `Char of Base__Char.t | `Pred of Core_kernel__.Import.char -> bool ] -> Core_kernel__Int.t option Core.Or_error.tval read_until_gen : t -> [< `Char of Base__Char.t | `Pred of Core_kernel__.Import.char -> bool ] -> keep_delim:bool -> max:Core_kernel__Int.t option -> (([> `Eof | `Eof_without_delim of Core_kernel__.Import.string | `Max_exceeded of Core_kernel__.Import.string | `Ok of Core_kernel__.Import.string ], Core_kernel.Error.t) Core._result -> unit) -> unitval read_until : t -> [< `Char of Base__Char.t | `Pred of Core_kernel__.Import.char -> bool ] -> keep_delim:bool -> (([> `Eof | `Eof_without_delim of Core_kernel__.Import.string | `Ok of Core_kernel__.Import.string ], Core_kernel.Error.t) Core._result -> unit) -> unitval line_delimiter_pred : [> `Char of char ]val read_line_gen : t -> ([> `Eof | `Eof_without_delim of Core_kernel__.Import.string | `Ok of Core.String.t ] -> unit) -> unitval read_line : t -> [> `Eof | `Ok of Core_kernel__.Import.string ] Async_unix__.Import.Deferred.tval really_read_line : wait_time:Core.Time.Span.t -> t -> Core.String.t option Async_unix__.Import.Deferred.tval space : Core.Bigstring.t
type 'sexp sexp_kind=|Plain : Core.Sexp.t sexp_kind|Annotated : Core.Sexp.Annotated.t sexp_kind
val gen_read_sexp : ?parse_pos:Core.Sexp.Parse_pos.t -> t -> sexp_kind:'a sexp_kind -> (([> `Eof | `Ok of 'a * Core.Sexp.Parse_pos.t ], Core_kernel.Error.t) Core._result -> unit) -> unit
type 'a read= ?parse_pos:Core.Sexp.Parse_pos.t -> 'a
val gen_read_sexps : ?parse_pos:Core.Sexp.Parse_pos.t -> t -> sexp_kind:'a sexp_kind -> 'a Async_unix__.Import.Pipe.Reader.tval read_sexps : ?parse_pos:Core.Sexp.Parse_pos.t -> t -> Core.Sexp.t Async_unix__.Import.Pipe.Reader.tval read_annotated_sexps : ?parse_pos:Core.Sexp.Parse_pos.t -> t -> Core.Sexp.Annotated.t Async_unix__.Import.Pipe.Reader.t
module Peek_or_read : sig ... endval peek_or_read_bin_prot : ?max_len:int -> t -> peek_or_read:Peek_or_read.t -> 'a Bin_prot.Type_class.reader -> ([> `Eof | `Ok of 'a ] Core.Or_error.t -> unit) -> unitval read_marshal_raw : t -> [> `Eof | `Ok of Core.Bytes.t ] Async_kernel__Deferred.tval read_marshal : t -> [> `Eof | `Ok of 'a ] Async_kernel__Deferred.tval read_all : t -> (t -> [< `Eof | `Ok of 'a ] Async_kernel__Deferred.t) -> 'a Async_unix__.Import.Pipe.Reader.tval lines : t -> Core_kernel__.Import.string Async_unix__.Import.Pipe.Reader.tval contents : t -> string Async_kernel__Deferred.tval recv : t -> [> `Eof | `Ok of Core.Bytes.t ] Async_unix__.Import.Deferred.tval transfer : t -> (Base.string, Async_unix__.Import.Pipe.Writer.phantom) Async_unix__.Import.Pipe.t -> unit Async_unix__.Import.Deferred.t