package async_unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module State : sig ... end
module Open_flags = Unix.Open_flags
type open_flags = [
  1. | `Already_closed
  2. | `Ok of Open_flags.t
  3. | `Error of exn
]
val sexp_of_open_flags : open_flags -> Sexplib.Sexp.t
type t = {
  1. fd : Fd.t;
  2. id : Id.t;
  3. mutable buf : Core.Bigstring.t;
  4. mutable close_may_destroy_buf : [ `Yes | `Not_now | `Not_ever ];
  5. mutable pos : int;
  6. mutable available : int;
  7. mutable state : State.t;
  8. close_finished : unit Async_unix.Import.Ivar.t;
  9. mutable last_read_time : Core.Time.t;
  10. open_flags : open_flags Async_unix.Import.Deferred.t;
}
val last_read_time : t -> Core.Time.t
val set_last_read_time : t -> Core.Time.t -> unit
val state : t -> State.t
val set_state : t -> State.t -> unit
val available : t -> int
val set_available : t -> int -> unit
val pos : t -> int
val set_pos : t -> int -> unit
val close_may_destroy_buf : t -> [ `Not_ever | `Not_now | `Yes ]
val set_close_may_destroy_buf : t -> [ `Not_ever | `Not_now | `Yes ] -> unit
val buf : t -> Core.Bigstring.t
val set_buf : t -> Core.Bigstring.t -> unit
val id : t -> Id.t
val fd : t -> Fd.t
module Fields : sig ... end
val sexp_of_t : t -> Sexplib.Sexp.t
val io_stats : Io_stats.t
val invariant : t -> unit
val create : ?buf_len:Base.Int.t -> Fd.t -> t
val of_in_channel : Core.In_channel.t -> Fd.Kind.t -> t
val open_file : ?buf_len:Base.Int.t -> string -> t Async_kernel__.Types.Deferred.t
val stdin : t lazy_t
val close_finished : t -> unit Async_kernel__.Types.Deferred.t
val is_closed : t -> bool
val empty_buf : Core.Bigstring.t
val destroy : t -> unit
val close : t -> unit Async_kernel__.Types.Deferred.t
val with_reader_exclusive : t -> (unit -> 'a Async_unix.Import.Monitor.Deferred.t) -> 'a Async_kernel__.Types.Deferred.t
val with_file : ?buf_len:Base.Int.t -> ?exclusive:bool -> string -> f:(t -> 'a Async_unix.Import.Monitor.Deferred.t) -> 'a Async_kernel__.Types.Deferred.t
val get_data : t -> [ `Eof | `Ok ] Async_unix.Import.Deferred.t
val ensure_buf_len : t -> at_least:Base.Int.t -> unit
val get_data_until : t -> available_at_least:Base.Int.t -> [> `Eof of int | `Ok ] Async_kernel__.Types.Deferred.t
val with_nonempty_buffer : t -> ([ `Eof | `Ok ] -> 'a) -> 'a Async_unix.Import.Deferred.t
val with_nonempty_buffer' : ?force_refill:bool -> t -> ([ `Eof | `Ok ] -> unit) -> unit
val consume : t -> int -> unit
type 'a handle_chunk_result = [
  1. | `Stop of 'a
  2. | `Stop_consumed of 'a * int
  3. | `Continue
  4. | `Consumed of int * [ `Need of int | `Need_unknown ]
]
val sexp_of_handle_chunk_result : 'a. ('a -> Sexplib.Sexp.t) -> 'a handle_chunk_result -> Sexplib.Sexp.t
type 'a read_one_chunk_at_a_time_result = [
  1. | `Eof
  2. | `Stopped of 'a
  3. | `Eof_with_unconsumed_data of string
]
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 consumed = [
  1. | `Consumed of int * [ `Need of int | `Need_unknown ]
]
val sexp_of_consumed : consumed -> Sexplib.Sexp.t
val read_one_chunk_at_a_time : t -> handle_chunk: (Core.Bigstring.t -> pos:int -> len:int -> [< `Consumed of int * [ `Need of Base.Int.t | `Need_unknown ] | `Continue | `Stop of 'a | `Stop_consumed of 'a * int ] Async_unix.Import.Deferred.t) -> [> `Eof | `Eof_with_unconsumed_data of Base.String.t | `Stopped of 'a ] Async_unix.Import.Deferred.t
type 'a handle_iobuf_result = [
  1. | `Stop of 'a
  2. | `Continue
]
val sexp_of_handle_iobuf_result : 'a. ('a -> Sexplib.Sexp.t) -> 'a handle_iobuf_result -> Sexplib.Sexp.t
val read_one_iobuf_at_a_time : t -> handle_chunk: (([< Core_kernel.Perms.Read_write.t ], Core.Iobuf.seek) Core.Iobuf.t -> [< `Continue | `Stop of 'a ] Async_kernel__.Types.Deferred.t) -> [> `Eof | `Eof_with_unconsumed_data of Base.String.t | `Stopped of 'a ] Async_unix.Import.Deferred.t
module Read (S : Core.Substring_intf.S) (Name : sig ... end) : sig ... end
module Read_substring : sig ... end
val read_substring : t -> Core.Substring.t -> [> `Eof | `Ok of Core.Int.t ] Async_unix.Import.Deferred.t
val really_read_substring : t -> Core.Substring.t -> [> `Eof of int | `Ok ] Async_unix.Import.Deferred.t
module Read_bigsubstring : sig ... end
val read_bigsubstring : t -> Core.Bigsubstring.t -> [> `Eof | `Ok of Core.Int.t ] Async_unix.Import.Deferred.t
val really_read_bigsubstring : t -> Core.Bigsubstring.t -> [> `Eof of int | `Ok ] Async_unix.Import.Deferred.t
val really_read_bigstring : t -> Core_kernel.Bigstring.t -> [> `Eof of int | `Ok ] Async_unix.Import.Deferred.t
val peek : t -> len:Base.Int.t -> [> `Eof | `Ok of Base.String.t ] Async_kernel__.Types.Deferred.t
val read : t -> ?pos:Base.Int.t -> ?len:Base.Int.t -> Core.Substring.base -> [> `Eof | `Ok of Core.Int.t ] Async_unix.Import.Deferred.t
val really_read : t -> ?pos:Base.Int.t -> ?len:Base.Int.t -> Core.Substring.base -> [> `Eof of int | `Ok ] Async_unix.Import.Deferred.t
val read_char : t -> [> `Eof | `Ok of Base.Char.t ] Async_unix.Import.Deferred.t
val first_char : t -> [< `Char of Base.Char.t | `Pred of Base.Char.t -> bool ] -> int option Core.Or_error.t
val read_until_gen : t -> [< `Char of Base.Char.t | `Pred of Base.Char.t -> bool ] -> keep_delim:bool -> max:int option -> (([> `Eof | `Eof_without_delim of Base.String.t | `Max_exceeded of Base.String.t | `Ok of Base.String.t ], Core_kernel.Error.t) Core._result -> unit) -> unit
val read_until : t -> [< `Char of Base.Char.t | `Pred of Base.Char.t -> bool ] -> keep_delim:bool -> (([> `Eof | `Eof_without_delim of Base.String.t | `Ok of Base.String.t ], Core_kernel.Error.t) Core._result -> unit) -> unit
val line_delimiter_pred : [> `Char of char ]
val read_line_gen : t -> ([> `Eof | `Eof_without_delim of Base.String.t | `Ok of Core.String.t ] -> unit) -> unit
val read_line : t -> [> `Eof | `Ok of Base.String.t ] Async_unix.Import.Deferred.t
val really_read_line : wait_time:Core.Time.Span.t -> t -> Core.String.t option Async_unix.Import.Deferred.t
val space : Core.Bigstring.t
type 'sexp sexp_kind =
  1. | Plain : Core.Sexp.t sexp_kind
  2. | 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.t
module Peek_or_read : sig ... end
val peek_or_read_bin_prot : ?max_len:int -> t -> peek_or_read:Peek_or_read.t -> 'a Core.Bin_prot.Type_class.reader -> ([> `Eof | `Ok of 'a ] Core.Or_error.t -> unit) -> unit
val read_marshal_raw : t -> [> `Eof | `Ok of Core.String.t ] Async_kernel__.Types.Deferred.t
val read_marshal : t -> [> `Eof | `Ok of 'a ] Async_kernel__.Types.Deferred.t
val read_all : t -> (t -> [< `Eof | `Ok of 'a ] Async_kernel__.Types.Deferred.t) -> 'a Async_unix.Import.Pipe.Reader.t
val contents : t -> string Async_kernel__.Types.Deferred.t
val recv : t -> [> `Eof | `Ok of Core.String.t ] Async_unix.Import.Deferred.t
OCaml

Innovation. Community. Security.