Up

Module Reader

Signature

module Read_result : sig .. end
module Id : sig .. end
val sexp_of_t : t -> Sexplib.Sexp.t
val io_stats : Async_unix.Io_stats.t
val last_read_time : t -> Core.Std.Time.t
val stdin : t Core.Std.Lazy.t
val open_file : ?close_on_exec:bool -> ?buf_len:int -> string -> t Async_unix.Import.Deferred.t
val pipe : t -> string Async_unix.Import.Pipe.Reader.t
val create : ?buf_len:int -> Async_unix.Fd.t -> t
val of_in_channel : Core.Std.in_channel -> Async_unix.Fd.Kind.t -> t
val with_file : ?buf_len:int -> ?exclusive:bool -> string -> f:(t -> 'a Async_unix.Import.Deferred.t) -> 'a Async_unix.Import.Deferred.t
val close : t -> unit Async_unix.Import.Deferred.t
val close_finished : t -> unit Async_unix.Import.Deferred.t
val is_closed : t -> bool
val with_close : t -> f:(unit -> 'a Async_unix.Import.Deferred.t) -> 'a Async_unix.Import.Deferred.t
val id : t -> Id.t
val fd : t -> Async_unix.Fd.t
val read : t -> ?pos:int -> ?len:int -> string -> int Read_result.t Async_unix.Import.Deferred.t
val drain : t -> unit Async_unix.Import.Deferred.t
type 'a read_one_chunk_at_a_time_result = [
| `Eof
| `Eof_with_unconsumed_data of string
| `Stopped of 'a
]
val sexp_of_read_one_chunk_at_a_time_result : ('a -> Sexplib.Sexp.t) -> 'a read_one_chunk_at_a_time_result -> Sexplib.Sexp.t
type 'a handle_chunk_result = [
| `Consumed of int * [
| `Need of int
| `Need_unknown
]
| `Continue
| `Stop of 'a
| `Stop_consumed of 'a * int
]
val sexp_of_handle_chunk_result : ('a -> Sexplib.Sexp.t) -> 'a handle_chunk_result -> Sexplib.Sexp.t
val read_one_chunk_at_a_time : t -> handle_chunk:(Core.Std.Bigstring.t -> pos:int -> len:int -> 'a handle_chunk_result Async_unix.Import.Deferred.t) -> 'a read_one_chunk_at_a_time_result Async_unix.Import.Deferred.t
type 'a handle_iobuf_result = [
| `Continue
| `Stop of 'a
]
val sexp_of_handle_iobuf_result : ('a -> Sexplib.Sexp.t) -> 'a handle_iobuf_result -> Sexplib.Sexp.t
val really_read : t -> ?pos:int -> ?len:int -> string -> [
| `Eof of int
| `Ok
] Async_unix.Import.Deferred.t
val really_read_substring : t -> Core.Std.Substring.t -> [
| `Eof of int
| `Ok
] Async_unix.Import.Deferred.t
val really_read_bigsubstring : t -> Core.Std.Bigsubstring.t -> [
| `Eof of int
| `Ok
] Async_unix.Import.Deferred.t
val read_until : t -> [
| `Char of char
| `Pred of char -> bool
] -> keep_delim:bool -> [
| `Eof
| `Eof_without_delim of string
| `Ok of string
] Async_unix.Import.Deferred.t
val read_until_max : t -> [
| `Char of char
| `Pred of char -> bool
] -> keep_delim:bool -> max:int -> [
| `Eof
| `Eof_without_delim of string
| `Max_exceeded of string
| `Ok of string
] Async_unix.Import.Deferred.t
val read_line : t -> string Read_result.t Async_unix.Import.Deferred.t
val really_read_line : wait_time:Core.Std.Time.Span.t -> t -> string option Async_unix.Import.Deferred.t
type 'a read = ?parse_pos:Core.Std.Sexp.Parse_pos.t -> 'a
val read_bin_prot : ?max_len:int -> t -> 'a Core.Std.Bin_prot.Type_class.reader -> 'a Read_result.t Async_unix.Import.Deferred.t
val read_marshal_raw : t -> string Read_result.t Async_unix.Import.Deferred.t
val read_marshal : t -> 'a Read_result.t Async_unix.Import.Deferred.t
val lseek : t -> int64 -> mode:[<
| `End
| `Set
] -> int64 Async_unix.Import.Deferred.t
val lines : t -> string Async_unix.Import.Pipe.Reader.t
val contents : t -> string Async_unix.Import.Deferred.t
val file_contents : string -> string Async_unix.Import.Deferred.t
val file_lines : string -> string list Async_unix.Import.Deferred.t
type ('sexp, 'a, 'b) load = ?exclusive:bool -> ?expand_macros:bool -> string -> ('sexp -> 'a) -> 'b Async_unix.Import.Deferred.t
val load_sexp : (Core.Std.Sexp.t, 'a, 'a Core.Std.Or_error.t) load
val load_sexp_exn : (Core.Std.Sexp.t, 'a, 'a) load
val load_sexps : (Core.Std.Sexp.t, 'a, 'a list Core.Std.Or_error.t) load
val load_sexps_exn : (Core.Std.Sexp.t, 'a, 'a list) load
val load_annotated_sexp : (Core.Std.Sexp.Annotated.t, 'a, 'a Core.Std.Or_error.t) load
val load_annotated_sexp_exn : (Core.Std.Sexp.Annotated.t, 'a, 'a) load
val load_annotated_sexps : (Core.Std.Sexp.Annotated.t, 'a, 'a list Core.Std.Or_error.t) load
val load_annotated_sexps_exn : (Core.Std.Sexp.Annotated.t, 'a, 'a list) load
val open_gzip_file : string -> Async.Std.Reader.t Async.Std.Deferred.t
val with_gzip_file : string -> f:(Async.Std.Reader.t -> 'a Async.Std.Deferred.t) -> 'a Async.Std.Deferred.t
val with_hadoop_gzip_file : hadoop_file:string -> (Async.Std.Reader.t -> 'a Async.Std.Deferred.t) -> 'a Async.Std.Deferred.t
val with_xzip_file : string -> f:(Async.Std.Reader.t -> 'a Async.Std.Deferred.t) -> 'a Async.Std.Deferred.t