Module Async_unix__.Writer0
module Core_unix = Core.Unixmodule Unix = Async_unix__.Unix_syscallsmodule IOVec = Core.Unix.IOVecmodule Id : sig ... endval io_stats : Async_unix.Io_stats.tval debug : bool
module Line_ending : sig ... endmodule Check_buffer_age' : sig ... endmodule Open_flags = Unix.Open_flagstype open_flags= (Open_flags.t, exn) Core.Result.t
val sexp_of_open_flags : open_flags -> Ppx_sexp_conv_lib.Sexp.t
module Backing_out_channel = Async_unix__.Backing_out_channelmodule Destroy_or_keep : sig ... endmodule Scheduled : sig ... endtype t={id : Id.t;mutable fd : Async_unix.Fd.t;monitor : Async_unix__.Import.Monitor.t;inner_monitor : Async_unix__.Import.Monitor.t;mutable background_writer_state : [ `Running | `Not_running | `Stopped_permanently ];background_writer_stopped : unit Async_unix__.Import.Ivar.t;syscall : [ `Per_cycle | `Periodic of Core.Time.Span.t ];mutable bytes_received : Core.Int63.t;mutable bytes_written : Core.Int63.t;scheduled : Scheduled.t Core.sexp_opaque;mutable scheduled_bytes : int;mutable buf : Core.Bigstring.t Core.sexp_opaque;mutable scheduled_back : int;mutable back : int;flushes : (Core.Time_ns.t Async_unix__.Import.Ivar.t * Core.Int63.t) Core.Queue.t Core.sexp_opaque;mutable close_state : [ `Open | `Closed_and_flushing | `Closed ];close_finished : unit Async_unix__.Import.Ivar.t;close_started : unit Async_unix__.Import.Ivar.t;producers_to_flush_at_close : (unit -> unit Async_unix__.Import.Deferred.t) Core.Bag.t;mutable flush_at_shutdown_elt : t Core.sexp_opaque Core.Bag.Elt.t option;mutable check_buffer_age : t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t option;consumer_left : unit Async_unix__.Import.Ivar.t;mutable raise_when_consumer_leaves : bool;open_flags : open_flags Async_unix__.Import.Deferred.t;line_ending : Line_ending.t;mutable backing_out_channel : Backing_out_channel.t option;}
val backing_out_channel : t -> Backing_out_channel.t optionval set_backing_out_channel : t -> Backing_out_channel.t option -> unitval line_ending : t -> Line_ending.tval open_flags : t -> open_flags Async_unix__.Import.Deferred.tval raise_when_consumer_leaves : t -> boolval set_raise_when_consumer_leaves : t -> bool -> unitval consumer_left : t -> unit Async_unix__.Import.Ivar.tval check_buffer_age : t -> t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t optionval set_check_buffer_age : t -> t Core.sexp_opaque Check_buffer_age'.t Core.Bag.Elt.t option -> unitval flush_at_shutdown_elt : t -> t Core.sexp_opaque Core.Bag.Elt.t optionval set_flush_at_shutdown_elt : t -> t Core.sexp_opaque Core.Bag.Elt.t option -> unitval producers_to_flush_at_close : t -> (unit -> unit Async_unix__.Import.Deferred.t) Core.Bag.tval close_started : t -> unit Async_unix__.Import.Ivar.tval close_finished : t -> unit Async_unix__.Import.Ivar.tval close_state : t -> [ `Closed | `Closed_and_flushing | `Open ]val set_close_state : t -> [ `Closed | `Closed_and_flushing | `Open ] -> unitval flushes : t -> (Core.Time_ns.t Async_unix__.Import.Ivar.t * Core.Int63.t) Core.Queue.t Core.sexp_opaqueval back : t -> intval set_back : t -> int -> unitval scheduled_back : t -> intval set_scheduled_back : t -> int -> unitval buf : t -> Core.Bigstring.t Core.sexp_opaqueval set_buf : t -> Core.Bigstring.t Core.sexp_opaque -> unitval scheduled_bytes : t -> intval set_scheduled_bytes : t -> int -> unitval scheduled : t -> Scheduled.t Core.sexp_opaqueval bytes_written : t -> Core.Int63.tval set_bytes_written : t -> Core.Int63.t -> unitval bytes_received : t -> Core.Int63.tval set_bytes_received : t -> Core.Int63.t -> unitval syscall : t -> [ `Per_cycle | `Periodic of Core.Time.Span.t ]val background_writer_stopped : t -> unit Async_unix__.Import.Ivar.tval background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ]val set_background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ] -> unitval inner_monitor : t -> Async_unix__.Import.Monitor.tval monitor : t -> Async_unix__.Import.Monitor.tval fd : t -> Async_unix.Fd.tval set_fd : t -> Async_unix.Fd.t -> unitval id : t -> Id.t
module Fields : sig ... endval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
type writer= t
val sexp_of_writer : writer -> Ppx_sexp_conv_lib.Sexp.tval set_raise_when_consumer_leaves : t -> bool -> unitval bytes_to_write : t -> intval is_stopped_permanently : t -> boolval invariant : t Core.sexp_opaque -> unit
module Check_buffer_age : sig ... endval flushed_time_ns : t -> Core.Time_ns.t Async_kernel__Deferred.tval flushed_time : t -> Core__.Import_time.Time.t Async_unix__.Import.Deferred.tval flushed : t -> unit Async_kernel__Deferred.tval set_backing_out_channel : t -> Backing_out_channel.t -> unitval set_synchronous_backing_out_channel : t -> Backing_out_channel.t -> unit Async_kernel__Deferred.tval set_synchronous_out_channel : t -> Core.Out_channel.t -> unit Async_kernel__Deferred.tval clear_synchronous_out_channel : t -> unitval with_synchronous_backing_out_channel : t -> Backing_out_channel.t -> f:(unit -> 'a Async_kernel__Deferred.t) -> 'a Async_unix__.Import.Monitor.Deferred.tval with_synchronous_out_channel : t -> Core.Out_channel.t -> f:(unit -> 'a Async_kernel__Deferred.t) -> 'a Async_unix__.Import.Monitor.Deferred.tval set_fd : t -> Async_unix.Fd.t -> unit Async_kernel__Deferred.tval consumer_left : t -> unit Async_kernel__.Deferred0.tval close_finished : t -> unit Async_kernel__.Deferred0.tval close_started : t -> unit Async_kernel__.Deferred0.tval is_closed : t -> boolval is_open : t -> boolval writers_to_flush_at_shutdown : t Core.Bag.tval final_flush : ?force:unit Async_unix__.Import.Deferred.t -> t -> unit Async_unix__.Import.Deferred.tval close : ?force_close:unit Async_unix__.Import.Deferred.t -> t -> unit Async_kernel__.Deferred0.tval fill_flushes : t -> unitval stop_permanently : t -> unitval stopped_permanently : t -> unit Async_kernel__.Deferred0.tval die : t -> Base.Sexp.t -> 'a
type buffer_age_limit=[|`At_most of Core.Time.Span.t|`Unlimited]
val bin_shape_buffer_age_limit : Bin_prot.Shape.tval bin_size_buffer_age_limit : [> `At_most of Core.Time.Span.t ] -> intval bin_write_buffer_age_limit : Bin_prot.Common.buf -> pos:Bin_prot.Common.pos -> [< `At_most of Core.Time.Span.t | `Unlimited ] -> Bin_prot.Common.posval bin_writer_buffer_age_limit : [< `At_most of Core.Time.Span.t | `Unlimited At_most ] Bin_prot.Type_class.writerval __bin_read_buffer_age_limit__ : Bin_prot.Common.buf -> pos_ref:Bin_prot.Common.pos_ref -> int -> [> `At_most of Core.Time.Span.t | `Unlimited ]val bin_read_buffer_age_limit : Bin_prot.Common.buf -> pos_ref:Bin_prot.Common.pos_ref -> [> `At_most of Core.Time.Span.t | `Unlimited ]val bin_reader_buffer_age_limit : [> `At_most of Core.Time.Span.t | `Unlimited ] Bin_prot.Type_class.readerval bin_buffer_age_limit : [ `At_most of Core.Time.Span.t | `Unlimited ] Bin_prot.Type_class.tval __buffer_age_limit_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> buffer_age_limitval buffer_age_limit_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> buffer_age_limitval sexp_of_buffer_age_limit : buffer_age_limit -> Ppx_sexp_conv_lib.Sexp.tval create : ?buf_len:Core_kernel__Int.t -> ?syscall:[ `Per_cycle | `Periodic of Core.Time.Span.t ] -> ?buffer_age_limit:[ `At_most of Core.Time.Span.t | `Unlimited ] -> ?raise_when_consumer_leaves:bool -> ?line_ending:Line_ending.t -> Async_unix.Fd.t -> tval set_buffer_age_limit : writer -> [ `At_most of Core.Time.Span.t | `Unlimited ] -> unitval of_out_channel : Core.Out_channel.t -> Async_unix.Fd.Kind.t -> tval can_write : t -> boolval ensure_can_write : t -> unitval open_file : ?append:bool -> ?buf_len:Core_kernel__Int.t -> ?syscall:[ `Per_cycle | `Periodic of Core.Time.Span.t ] -> ?perm:Unix.file_perm -> ?line_ending:Line_ending.t -> string -> t Async_kernel__Deferred.tval with_close : t -> f:(unit -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_unix__.Import.Monitor.Deferred.tval with_writer_exclusive : t -> (unit -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_kernel__Deferred.tval with_file : ?perm:Unix.file_perm -> ?append:bool -> ?exclusive:bool -> ?line_ending:Line_ending.t -> string -> f:(t -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_kernel__Deferred.tval got_bytes : t -> int -> unitval add_iovec : t -> Destroy_or_keep.t -> Core.Bigstring.t IOVec.t -> count_bytes_as_received:bool -> unitval schedule_unscheduled : t -> Destroy_or_keep.t -> unitval dummy_iovec : IOVec.bigstring IOVec.tval mk_iovecs : t -> IOVec.bigstring IOVec.t Core.Array.t * bool * intval thread_io_cutoff : intval is_running : [> `Running ] -> boolval fd_closed : t -> unitval start_write : t -> unitval write_when_ready : t -> unitval write_finished : t -> Core_kernel__Int.t -> unitval maybe_start_writer : t -> unitval give_buf : t -> Core_kernel__Int.t -> Core.Bigstring.t Core.sexp_opaque * intval write_gen_internal : t -> 'a -> src_pos:int -> src_len:int -> allow_partial_write:bool -> blit_to_bigstring:('a, Core.Bigstring.t) Core.Blit.blit -> unitval write_direct : t -> f:(Core.Bigstring.t Core.sexp_opaque -> pos:int -> len:int -> 'a * Core_kernel__Int.t) -> 'a optionval write_gen_unchecked : ?pos:int -> ?len:int -> t -> 'a -> blit_to_bigstring:('a, Core.Bigstring.t) Core.Blit.blit -> length:('a -> int) -> unitval write_gen_whole_unchecked : t -> 'a -> blit_to_bigstring:('a -> Core.Bigstring.t -> pos:int -> unit) -> length:('a -> Core_kernel__Int.t) -> unitval write_bytes : ?pos:int -> ?len:int -> t -> Base.bytes -> unitval write : ?pos:int -> ?len:int -> t -> Base.string -> unitval write_bigstring : ?pos:int -> ?len:int -> t -> Core.Bigstring.t -> unitval write_iobuf : ?pos:int -> ?len:int -> t -> ([> Core__.Import.read ], 'a) Core.Iobuf.t -> unitval write_substring : t -> Core.Substring.t -> unitval write_bigsubstring : t -> Core.Bigsubstring.t -> unitval writef : t -> ('a, unit, string, unit) Stdlib.format4 -> 'aval write_gen : ?pos:int -> ?len:int -> t -> 'a -> blit_to_bigstring:('a, Core.Bigstring.t) Core.Blit.blit -> length:('a -> int) -> unitval write_gen_whole : t -> 'a -> blit_to_bigstring:('a -> Core.Bigstring.t -> pos:int -> unit) -> length:('a -> Core_kernel__Int.t) -> unitval to_formatter : t -> Stdlib.Format.formatterval write_char : t -> Core_kernel__.Import.char -> unitval newline : ?line_ending:Line_ending.t -> t -> unitval write_line : ?line_ending:Line_ending.t -> t -> Base.string -> unitval write_byte : t -> Core_kernel.Int.t -> unit
module Terminate_with : sig ... endval write_sexp_internal : terminate_with:Terminate_with.t -> ?hum:bool -> t -> Core.Sexp.t -> unitval write_sexp : ?hum:bool -> ?terminate_with:Terminate_with.t -> t -> Core.Sexp.t -> unitval write_bin_prot : t -> 'a Bin_prot.Type_class.writer -> 'a -> unitval write_bin_prot_no_size_header : t -> size:Core_kernel__Int.t -> (Core.Bigstring.t Core.sexp_opaque -> pos:int -> 'a -> int) -> 'a -> unitval send : t -> Core.String.t -> unitval schedule_iovec : ?destroy_or_keep:Destroy_or_keep.t -> t -> Core.Bigstring.t IOVec.t -> unitval schedule_iovecs : t -> Core.Bigstring.t IOVec.t Core.Queue.t -> unitval schedule_bigstring : ?destroy_or_keep:Destroy_or_keep.t -> t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unitval schedule_bigsubstring : t -> Core.Bigsubstring.t -> unitval schedule_iobuf_peek : t -> ?pos:int -> ?len:int -> ('a, 'b) Core__Iobuf.t -> unitval schedule_iobuf_consume : t -> ?len:int -> ('a, Core.Iobuf.seek) Core.Iobuf.t -> unit Async_kernel__Deferred.tval fsync : t -> unit Async_kernel__Deferred.tval fdatasync : t -> unit Async_kernel__Deferred.tval write_bin_prot : t -> 'a Bin_prot.Type_class.writer -> 'a -> unitval send : t -> Core.String.t -> unitval schedule_iovec : ?destroy_or_keep:Destroy_or_keep.t -> t -> Core.Bigstring.t IOVec.t -> unitval schedule_iovecs : t -> Core.Bigstring.t IOVec.t Core.Queue.t -> unitval schedule_bigstring : t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unitval schedule_bigsubstring : t -> Core.Bigsubstring.t -> unitval schedule_iobuf_peek : t -> ?pos:int -> ?len:int -> ('a, 'b) Core__Iobuf.t -> unitval schedule_iobuf_consume : t -> ?len:int -> ('a, Core.Iobuf.seek) Core.Iobuf.t -> unit Async_kernel__Deferred.tval write_gen : ?pos:int -> ?len:int -> t -> 'a -> blit_to_bigstring:('a, Core.Bigstring.t) Core.Blit.blit -> length:('a -> int) -> unitval write_bytes : ?pos:int -> ?len:int -> t -> Base.bytes -> unitval write : ?pos:int -> ?len:int -> t -> Base.string -> unitval write_line : ?line_ending:Line_ending.t -> t -> Base.string -> unitval writef : t -> ('a, unit, string, unit) Stdlib.format4 -> 'aval write_sexp : ?hum:bool -> ?terminate_with:Terminate_with.t -> t -> Core.Sexp.t -> unitval write_iobuf : ?pos:int -> ?len:int -> t -> ([> Core__.Import.read ], 'a) Core.Iobuf.t -> unitval write_bigstring : ?pos:int -> ?len:int -> t -> Core.Bigstring.t -> unitval write_bigsubstring : t -> Core.Bigsubstring.t -> unitval write_substring : t -> Core.Substring.t -> unitval write_byte : t -> Core_kernel.Int.t -> unitval write_char : t -> Core_kernel__.Import.char -> unitval newline : ?line_ending:Line_ending.t -> t -> unitval stdout_and_stderr : (t * t) lazy_tval stdout : t lazy_tval stderr : t lazy_tval use_synchronous_stdout_and_stderr : unit -> unit Async_unix__.Import.Deferred.tval behave_nicely_in_pipeline : ?writers:writer Core.List.t -> unit -> unitval apply_umask : int -> intval with_file_atomic : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> string -> f:(t -> 'a Async_kernel__Deferred.t) -> 'a Async_kernel__Deferred.tval save : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> string -> contents:Base.string -> unit Async_kernel__Deferred.tval save_lines : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> string -> Base.string Core.List.t -> unit Async_kernel__Deferred.tval save_sexp : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> ?hum:bool -> string -> Core.Sexp.t -> unit Async_kernel__Deferred.tval save_sexps : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> ?hum:bool -> string -> Core.Sexp.t Core.List.t -> unit Async_kernel__Deferred.tval save_bin_prot : ?temp_file:string -> ?perm:Async_unix__Unix_syscalls.file_perm -> ?fsync:bool -> string -> 'a Bin_prot.Type_class.writer -> 'a -> unit Async_kernel__Deferred.tval with_flushed_at_close : t -> flushed:(unit -> unit Async_unix__.Import.Deferred.t) -> f:(unit -> 'a Async_unix__.Import.Monitor.Deferred.t) -> 'a Async_unix__.Import.Monitor.Deferred.tval make_transfer : ?stop:unit Async_unix__.Import.Deferred.t -> ?max_num_values_per_read:int -> t -> 'a Async_unix__.Import.Pipe.Reader.t -> ('a Core_kernel.Queue.t -> cont:(unit -> unit) -> unit) -> unit Async_unix__.Import.Monitor.Deferred.tval transfer : ?stop:unit Async_unix__.Import.Deferred.t -> ?max_num_values_per_read:int -> t -> 'a Async_unix__.Import.Pipe.Reader.t -> ('a -> unit) -> unit Async_unix__.Import.Monitor.Deferred.tval transfer' : ?stop:unit Async_unix__.Import.Deferred.t -> ?max_num_values_per_read:int -> t -> 'a Async_unix__.Import.Pipe.Reader.t -> ('a Core_kernel.Queue.t -> unit Async_kernel__Deferred.t) -> unit Async_unix__.Import.Monitor.Deferred.tval pipe : t -> Base.string Async_unix__.Import.Pipe.Writer.t