Up
Module
Reader0
Signature
module
Scheduler
=
Raw_scheduler
module
Unix
=
Unix_syscalls
module
Id
: sig .. end
module
Read_result
: sig .. end
module
Internal
: sig .. end
type
t =
Internal.t
val
sexp_of_t :
t
->
Sexplib.Sexp.t
type
'a handle_chunk_result = 'a
Internal.handle_chunk_result
val
sexp_of_handle_chunk_result : 'a . ('a ->
Sexplib.Sexp.t
) -> 'a
handle_chunk_result
->
Sexplib.Sexp.t
type
'a handle_iobuf_result = 'a
Internal.handle_iobuf_result
val
sexp_of_handle_iobuf_result : 'a . ('a ->
Sexplib.Sexp.t
) -> 'a
handle_iobuf_result
->
Sexplib.Sexp.t
type
'a read_one_chunk_at_a_time_result = 'a
Internal.read_one_chunk_at_a_time_result
val
sexp_of_read_one_chunk_at_a_time_result : 'a . ('a ->
Sexplib.Sexp.t
) -> 'a
read_one_chunk_at_a_time_result
->
Sexplib.Sexp.t
type
'a read = 'a
Internal.read
val
close :
Internal.t
-> unit
Async_kernel.Deferred0.t
val
close_finished :
Internal.t
-> unit
Async_kernel.Deferred0.t
val
create : ?buf_len:int ->
Fd.t
->
Internal.t
val
fd :
Internal.t
->
Fd.t
val
id :
Internal.t
->
Id.t
val
invariant :
Internal.t
-> unit
val
io_stats :
Io_stats.t
val
is_closed :
Internal.t
-> bool
val
last_read_time :
Internal.t
->
Core.Std.Time.t
val
of_in_channel :
Core.Std.In_channel.t
->
Fd.Kind.t
->
Internal.t
val
open_file : ?close_on_exec:bool -> ?buf_len:int -> string ->
Internal.t
Import.Deferred.t
val
stdin :
Internal.t
lazy_t
val
with_close :
Internal.t
-> f:(unit -> 'a
Import.Monitor.Deferred.t
) -> 'a
Import.Monitor.Deferred.t
val
with_file : ?buf_len:int -> ?exclusive:bool -> string -> f:(
Internal.t
-> 'a
Import.Monitor.Deferred.t
) -> 'a
Import.Deferred.t
val
use :
t
-> unit
val
finished_read :
Internal.t
-> unit
val
do_read :
t
-> (unit -> 'a
Import.Deferred.t
) -> 'a
Import.Deferred.t
val
read :
t
-> ?pos:int -> ?len:int ->
Core.Std.Substring.base
-> [>
| `Eof
| `Ok
of
Core.Std.Int.t
]
Import.Deferred.t
val
read_char :
t
-> [>
| `Eof
| `Ok
of
char
]
Import.Deferred.t
val
read_substring :
t
->
Core.Std.Substring.t
-> [>
| `Eof
| `Ok
of
Core.Std.Int.t
]
Import.Deferred.t
val
read_bigsubstring :
t
->
Core.Std.Bigsubstring.t
-> [>
| `Eof
| `Ok
of
Core.Std.Int.t
]
Import.Deferred.t
val
read_one_chunk_at_a_time :
t
-> handle_chunk:(
Core.Std.Bigstring.t
Core.Std.sexp_opaque
-> pos:int -> len:int -> [<
| `Consumed
of
int * [
| `Need
of
Core.Std.Int.t
| `Need_unknown
]
| `Continue
| `Stop
of
'a
| `Stop_consumed
of
'a * int
]
Import.Deferred.t
) -> [>
| `Eof
| `Eof_with_unconsumed_data
of
string
| `Stopped
of
'a
]
Import.Deferred.t
val
read_one_iobuf_at_a_time :
t
-> handle_chunk:(([<
|
Core_kernel.Std.read_write
],
Core.Std.Iobuf.seek
)
Core.Std.Iobuf.t
-> [<
| `Continue
| `Stop
of
'a
]
Import.Deferred.t
) -> [>
| `Eof
| `Eof_with_unconsumed_data
of
string
| `Stopped
of
'a
]
Import.Deferred.t
val
really_read :
t
-> ?pos:int -> ?len:int ->
Core.Std.Substring.base
-> [>
| `Eof
of
int
| `Ok
]
Import.Deferred.t
val
really_read_substring :
t
->
Core.Std.Substring.t
-> [>
| `Eof
of
int
| `Ok
]
Import.Deferred.t
val
really_read_bigsubstring :
t
->
Core.Std.Bigsubstring.t
-> [>
| `Eof
of
int
| `Ok
]
Import.Deferred.t
val
read_line :
t
-> [>
| `Eof
| `Ok
of
Core.Std.String.t
]
Import.Deferred.t
val
really_read_line : wait_time:
Core.Std.Time.Span.t
->
t
->
Core.Std.String.t
option
Import.Deferred.t
val
do_read_k :
t
-> (('a
Core.Std.Or_error.t
-> unit) -> unit) -> ('a -> 'b) -> 'b
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
]
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
]
Import.Deferred.t
val
read_sexp : ?parse_pos:
Core.Std.Sexp.Parse_pos.t
->
t
-> [>
| `Eof
| `Ok
of
Core.Std.Sexp.t
]
Import.Deferred.t
val
read_sexps : ?parse_pos:
Core.Std.Sexp.Parse_pos.t
->
t
->
Core.Std.Sexp.t
Import.Pipe.Reader.t
val
read_annotated_sexps : ?parse_pos:
Core.Std.Sexp.Parse_pos.t
->
t
->
Core.Std.Sexp.Annotated.t
Import.Pipe.Reader.t
val
read_bin_prot : ?max_len:
Core.Std.Int.t
->
t
-> 'a
Core.Std.Bin_prot.Type_class.reader
-> [>
| `Eof
| `Ok
of
'a
]
Import.Deferred.t
val
read_marshal_raw :
t
-> [>
| `Eof
| `Ok
of
Core.Std.String.t
]
Import.Deferred.t
val
read_marshal :
t
-> [>
| `Eof
| `Ok
of
'a
]
Import.Deferred.t
val
recv :
t
-> [>
| `Eof
| `Ok
of
Core.Std.String.t
]
Import.Deferred.t
val
read_all :
Internal.t
-> (
Internal.t
-> [<
| `Eof
| `Ok
of
'a
]
Import.Deferred.t
) -> 'a
Import.Pipe.Reader.t
val
lines :
t
->
Core.Std.String.t
Import.Pipe.Reader.t
val
contents :
t
-> string
Import.Deferred.t
val
file_contents : string -> string
Import.Deferred.t
val
file_lines : string ->
Core.Std.String.t
list
Import.Deferred.t
val
transfer :
t
-> (string,
Import.Pipe.Writer.phantom
)
Import.Pipe.t
-> unit
Import.Deferred.t
val
lseek :
t
-> int64 -> mode:[<
| `Cur
| `End
| `Set
] -> int64
Import.Deferred.t
val
get_error : file:string -> sexp_kind:'a
Internal.sexp_kind
-> a_of_sexp:('a -> 'b) ->
Core.Std.Sexp.Annotated.t
-> (unit,
Core_kernel.Error.t
)
Core.Std._result
val
gen_load_exn : ?exclusive:bool -> sexp_kind:'a
Internal.sexp_kind
-> file:string -> ('a list -> 'b) -> (
Core.Std.Sexp.Annotated.t
list ->
Core.Std.Error.t
) -> 'b
Import.Deferred.t
type
('sexp, 'a, 'b) load = ?exclusive:bool -> ?expand_macros:bool -> string -> ('sexp -> 'a) -> 'b
Import.Deferred.t
module
Macro_loader
: sig .. end
val
get_load_result_exn : [<
| `Error
of
exn * 'a
| `Result
of
'b
] -> 'b
val
gen_load_sexp_exn : ?exclusive:bool -> ?expand_macros:bool -> sexp_kind:'a
Internal.sexp_kind
-> file:string -> a_of_sexp:('a -> 'b) -> 'b
Import.Deferred.t
val
load_sexp_exn : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.t
-> 'a) -> 'a
Import.Deferred.t
val
load_annotated_sexp_exn : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.Annotated.t
-> 'a) -> 'a
Import.Deferred.t
val
gen_load_sexp : ?exclusive:bool -> ?expand_macros:bool -> sexp_kind:'a
Internal.sexp_kind
-> file:string -> a_of_sexp:('a -> 'b) -> 'b
Import.Deferred.Or_error.t
val
load_sexp : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.t
-> 'a) -> 'a
Import.Deferred.Or_error.t
val
load_annotated_sexp : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.Annotated.t
-> 'a) -> 'a
Import.Deferred.Or_error.t
val
gen_load_sexps_exn : ?exclusive:bool -> ?expand_macros:bool -> sexp_kind:'a
Internal.sexp_kind
-> file:string -> a_of_sexp:('a -> 'b) -> 'b
Core.Std.List.t
Import.Deferred.t
val
load_sexps_exn : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.t
-> 'a) -> 'a
Core.Std.List.t
Import.Deferred.t
val
load_annotated_sexps_exn : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.Annotated.t
-> 'a) -> 'a
Core.Std.List.t
Import.Deferred.t
val
gen_load_sexps : ?exclusive:bool -> ?expand_macros:bool -> sexp_kind:'a
Internal.sexp_kind
-> file:string -> a_of_sexp:('a -> 'b) -> 'b
Core.Std.List.t
Import.Deferred.Or_error.t
val
load_sexps : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.t
-> 'a) -> 'a
Core.Std.List.t
Import.Deferred.Or_error.t
val
load_annotated_sexps : ?exclusive:bool -> ?expand_macros:bool -> string -> (
Core.Std.Sexp.Annotated.t
-> 'a) -> 'a
Core.Std.List.t
Import.Deferred.Or_error.t
val
pipe :
t
-> string
Import.Pipe.Reader.t
val
drain :
t
-> unit
Import.Deferred.t