module Core_unix : Core.Std.Unix
module Unix : Unix_syscalls
module IOVec : Core.Std.Unix.IOVec
module Id : Core.Std.Unique_id.Int63(sig .. end)
val io_stats : Io_stats.t
val debug : bool
module Check_buffer_age' : sig .. end
type 'a t = {
writer : 'a;
queue : (Core.Std.Int63.t * Core.Std.Time.t) Core.Std.Queue.t;
maximum_age : Core.Std.Time.Span.t;
mutable too_old : unit Import.Ivar.t;
}
val sexp_of_t : 'a. ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
module Open_flags : Unix.Open_flags
type open_flags = (Open_flags.t, exn) Core.Std.Result.t
val sexp_of_open_flags : open_flags -> Sexplib.Sexp.t
type t = {
id : Id.t;
mutable fd : Fd.t;
monitor : Import.Monitor.t;
mutable background_writer_state : [ `Not_running | `Running | `Stopped_permanently ];
syscall : [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ];
mutable bytes_received : Core.Std.Int63.t;
mutable bytes_written : Core.Std.Int63.t;
scheduled : (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ]) Core.Std.Dequeue.t Core.Std.sexp_opaque;
mutable scheduled_bytes : int;
mutable buf : Core.Std.Bigstring.t Core.Std.sexp_opaque;
mutable scheduled_back : int;
mutable back : int;
flushes : (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t Core.Std.sexp_opaque;
mutable close_state : [ `Closed | `Closed_and_flushing | `Open ];
close_finished : unit Import.Ivar.t;
producers_to_flush_at_close : (unit -> unit Import.Deferred.t) Core.Std.Bag.t;
mutable flush_at_shutdown_elt : t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option;
mutable check_buffer_age : t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t option;
consumer_left : unit Import.Ivar.t;
mutable raise_when_consumer_leaves : bool;
default is true
open_flags : open_flags Import.Deferred.t;
}
val sexp_of_t : t -> Sexplib.Sexp.t
val open_flags : t -> open_flags Import.Deferred.t
val raise_when_consumer_leaves : t -> bool
val set_raise_when_consumer_leaves : t -> bool -> unit
val consumer_left : t -> unit Import.Ivar.t
val check_buffer_age : t -> t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t option
val set_check_buffer_age : t ->
t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t option -> unit
val flush_at_shutdown_elt : t -> t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option
val set_flush_at_shutdown_elt : t -> t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option -> unit
val producers_to_flush_at_close : t -> (unit -> unit Import.Deferred.t) Core.Std.Bag.t
val close_finished : t -> unit Import.Ivar.t
val close_state : t -> [ `Closed | `Closed_and_flushing | `Open ]
val set_close_state : t -> [ `Closed | `Closed_and_flushing | `Open ] -> unit
val flushes : t ->
(Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
Core.Std.sexp_opaque
val back : t -> int
val set_back : t -> int -> unit
val scheduled_back : t -> int
val set_scheduled_back : t -> int -> unit
val buf : t -> Core.Std.Bigstring.t Core.Std.sexp_opaque
val set_buf : t -> Core.Std.Bigstring.t Core.Std.sexp_opaque -> unit
val scheduled_bytes : t -> int
val set_scheduled_bytes : t -> int -> unit
val scheduled : t ->
(Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ]) Core.Std.Dequeue.t
Core.Std.sexp_opaque
val bytes_written : t -> Core.Std.Int63.t
val set_bytes_written : t -> Core.Std.Int63.t -> unit
val bytes_received : t -> Core.Std.Int63.t
val set_bytes_received : t -> Core.Std.Int63.t -> unit
val syscall : t -> [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ]
val background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ]
val set_background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ] -> unit
val monitor : t -> Import.Monitor.t
val fd : t -> Fd.t
val set_fd : t -> Fd.t -> unit
val id : t -> Id.t
module Fields : sig .. end
val names : string list
val open_flags : ([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
Fieldslib.Field.t_with_perm
val raise_when_consumer_leaves : ([< `Read | `Set_and_create ], t, bool) Fieldslib.Field.t_with_perm
val consumer_left : ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
Fieldslib.Field.t_with_perm
val check_buffer_age : ([< `Read | `Set_and_create ], t,
 t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t option)
Fieldslib.Field.t_with_perm
val flush_at_shutdown_elt : ([< `Read | `Set_and_create ], t,
 t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
Fieldslib.Field.t_with_perm
val producers_to_flush_at_close : ([< `Read | `Set_and_create ], t,
 (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
Fieldslib.Field.t_with_perm
val close_finished : ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
Fieldslib.Field.t_with_perm
val close_state : ([< `Read | `Set_and_create ], t, [ `Closed | `Closed_and_flushing | `Open ])
Fieldslib.Field.t_with_perm
val flushes : ([< `Read | `Set_and_create ], t,
 (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
 Core.Std.sexp_opaque)
Fieldslib.Field.t_with_perm
val back : ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm
val scheduled_back : ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm
val buf : ([< `Read | `Set_and_create ], t, Core.Std.Bigstring.t Core.Std.sexp_opaque)
Fieldslib.Field.t_with_perm
val scheduled_bytes : ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm
val scheduled : ([< `Read | `Set_and_create ], t,
 (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ]) Core.Std.Dequeue.t
 Core.Std.sexp_opaque)
Fieldslib.Field.t_with_perm
val bytes_written : ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
Fieldslib.Field.t_with_perm
val bytes_received : ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
Fieldslib.Field.t_with_perm
val syscall : ([< `Read | `Set_and_create ], t,
 [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
Fieldslib.Field.t_with_perm
val background_writer_state : ([< `Read | `Set_and_create ], t,
 [ `Not_running | `Running | `Stopped_permanently ])
Fieldslib.Field.t_with_perm
val monitor : ([< `Read | `Set_and_create ], t, Import.Monitor.t)
Fieldslib.Field.t_with_perm
val fd : ([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm
val id : ([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm
val make_creator : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    'a -> ('b -> Id.t) * 'c) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    'c -> ('b -> Fd.t) * 'd) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> 'd -> ('b -> Import.Monitor.t) * 'e) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm ->
                         'e ->
                         ('b ->
                          [ `Not_running | `Running | `Stopped_permanently ]) *
                         'f) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm ->
         'f ->
         ('b -> [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ]) * 'g) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm ->
                'g -> ('b -> Core.Std.Int63.t) * 'h) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm ->
               'h -> ('b -> Core.Std.Int63.t) * 'i) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm ->
           'i ->
           ('b ->
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque) *
           'j) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> 'j -> ('b -> int) * 'k) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm ->
     'k -> ('b -> Core.Std.Bigstring.t Core.Std.sexp_opaque) * 'l) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'l -> ('b -> int) * 'm) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      'm -> ('b -> int) * 'n) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm ->
         'n ->
         ('b ->
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque) *
         'o) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm ->
             'o -> ('b -> [ `Closed | `Closed_and_flushing | `Open ]) * 'p) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm ->
                'p -> ('b -> unit Import.Ivar.t) * 'q) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm ->
                             'q ->
                             ('b ->
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t) *
                             'r) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm ->
                       'r ->
                       ('b ->
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option) *
                       's) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm ->
                  's ->
                  ('b ->
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option) *
                  't) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm ->
               't -> ('b -> unit Import.Ivar.t) * 'u) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm ->
                            'u -> ('b -> bool) * 'v) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm ->
            'v -> ('b -> open_flags Import.Deferred.t) * 'w) ->
'a -> ('b -> t) * 'w
val create : id:Id.t ->
fd:Fd.t ->
monitor:Import.Monitor.t ->
background_writer_state:[ `Not_running | `Running | `Stopped_permanently ] ->
syscall:[ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] ->
bytes_received:Core.Std.Int63.t ->
bytes_written:Core.Std.Int63.t ->
scheduled:(Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
          Core.Std.Dequeue.t Core.Std.sexp_opaque ->
scheduled_bytes:int ->
buf:Core.Std.Bigstring.t Core.Std.sexp_opaque ->
scheduled_back:int ->
back:int ->
flushes:(Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
        Core.Std.sexp_opaque ->
close_state:[ `Closed | `Closed_and_flushing | `Open ] ->
close_finished:unit Import.Ivar.t ->
producers_to_flush_at_close:(unit -> unit Import.Deferred.t) Core.Std.Bag.t ->
flush_at_shutdown_elt:t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option ->
check_buffer_age:t Core.Std.sexp_opaque Check_buffer_age'.t
                 Core.Std.Bag.Elt.t option ->
consumer_left:unit Import.Ivar.t ->
raise_when_consumer_leaves:bool ->
open_flags:open_flags Import.Deferred.t -> t
val map : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    Id.t) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    Fd.t) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> Import.Monitor.t) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm ->
                         [ `Not_running | `Running | `Stopped_permanently ]) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm ->
         [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ]) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> Core.Std.Int63.t) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> Core.Std.Int63.t) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm ->
           (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
           Core.Std.Dequeue.t Core.Std.sexp_opaque) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> int) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> Core.Std.Bigstring.t Core.Std.sexp_opaque) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> int) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      int) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm ->
         (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
         Core.Std.sexp_opaque) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm ->
             [ `Closed | `Closed_and_flushing | `Open ]) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> unit Import.Ivar.t) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm ->
                             (unit -> unit Import.Deferred.t) Core.Std.Bag.t) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm ->
                       t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm ->
                  t Core.Std.sexp_opaque Check_buffer_age'.t
                  Core.Std.Bag.Elt.t option) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> unit Import.Ivar.t) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> open_flags Import.Deferred.t) ->
t
val iter : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm -> 'a) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm -> 'b) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> 'c) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm -> 'd) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm -> 'e) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> 'f) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> 'g) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm -> 'h) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> 'i) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> 'j) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'k) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      'l) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm -> 'm) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm -> 'n) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> 'o) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm -> 'p) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm -> 'q) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm -> 'r) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> 's) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 't) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> 'u) ->
'u
val fold : init:'a ->
id:('a ->
    ([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm -> 'b) ->
fd:('b ->
    ([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm -> 'c) ->
monitor:('c ->
         ([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> 'd) ->
background_writer_state:('d ->
                         ([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm -> 'e) ->
syscall:('e ->
         ([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm -> 'f) ->
bytes_received:('f ->
                ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> 'g) ->
bytes_written:('g ->
               ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> 'h) ->
scheduled:('h ->
           ([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm -> 'i) ->
scheduled_bytes:('i ->
                 ([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> 'j) ->
buf:('j ->
     ([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> 'k) ->
scheduled_back:('k ->
                ([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'l) ->
back:('l ->
      ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      'm) ->
flushes:('m ->
         ([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm -> 'n) ->
close_state:('n ->
             ([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm -> 'o) ->
close_finished:('o ->
                ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> 'p) ->
producers_to_flush_at_close:('p ->
                             ([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm -> 'q) ->
flush_at_shutdown_elt:('q ->
                       ([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm -> 'r) ->
check_buffer_age:('r ->
                  ([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm -> 's) ->
consumer_left:('s ->
               ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> 't) ->
raise_when_consumer_leaves:('t ->
                            ([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 'u) ->
open_flags:('u ->
            ([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> 'v) ->
'v
val map_poly : ([< `Read | `Set_and_create ], t, 'a) Fieldslib.Field.user -> 'a list
val for_all : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    bool) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    bool) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> bool) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm -> bool) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm -> bool) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> bool) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> bool) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm -> bool) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> bool) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> bool) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> bool) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      bool) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm -> bool) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm -> bool) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> bool) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm -> bool) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm -> bool) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm -> bool) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> bool) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> bool) ->
bool
val exists : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    bool) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    bool) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> bool) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm -> bool) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm -> bool) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> bool) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> bool) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm -> bool) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> bool) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> bool) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> bool) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      bool) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm -> bool) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm -> bool) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> bool) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm -> bool) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm -> bool) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm -> bool) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> bool) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> bool) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> bool) ->
bool
val to_list : id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm -> 'a) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm -> 'a) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> 'a) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm -> 'a) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm -> 'a) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> 'a) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> 'a) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm -> 'a) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> 'a) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm -> 'a) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> 'a) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      'a) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm -> 'a) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm -> 'a) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> 'a) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm -> 'a) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm -> 'a) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm -> 'a) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> 'a) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> 'a) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm -> 'a) ->
'a list
module Direct : sig .. end
val iter : t ->
id:(([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    t -> Id.t -> 'a) ->
fd:(([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    t -> Fd.t -> 'b) ->
monitor:(([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> t -> Import.Monitor.t -> 'c) ->
background_writer_state:(([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm ->
                         t ->
                         [ `Not_running | `Running | `Stopped_permanently ] ->
                         'd) ->
syscall:(([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm ->
         t -> [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] -> 'e) ->
bytes_received:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> t -> Core.Std.Int63.t -> 'f) ->
bytes_written:(([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> t -> Core.Std.Int63.t -> 'g) ->
scheduled:(([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm ->
           t ->
           (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
           Core.Std.Dequeue.t Core.Std.sexp_opaque -> 'h) ->
scheduled_bytes:(([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> t -> int -> 'i) ->
buf:(([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm ->
     t -> Core.Std.Bigstring.t Core.Std.sexp_opaque -> 'j) ->
scheduled_back:(([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> t -> int -> 'k) ->
back:(([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      t -> int -> 'l) ->
flushes:(([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm ->
         t ->
         (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
         Core.Std.sexp_opaque -> 'm) ->
close_state:(([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm ->
             t -> [ `Closed | `Closed_and_flushing | `Open ] -> 'n) ->
close_finished:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> t -> unit Import.Ivar.t -> 'o) ->
producers_to_flush_at_close:(([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm ->
                             t ->
                             (unit -> unit Import.Deferred.t) Core.Std.Bag.t ->
                             'p) ->
flush_at_shutdown_elt:(([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm ->
                       t ->
                       t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option -> 'q) ->
check_buffer_age:(([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm ->
                  t ->
                  t Core.Std.sexp_opaque Check_buffer_age'.t
                  Core.Std.Bag.Elt.t option -> 'r) ->
consumer_left:(([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> t -> unit Import.Ivar.t -> 's) ->
raise_when_consumer_leaves:(([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> t -> bool -> 't) ->
open_flags:(([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm ->
            t -> open_flags Import.Deferred.t -> 'u) ->
'u
val fold : t ->
init:'a ->
id:('a ->
    ([< `Read | `Set_and_create ], t, Id.t) Fieldslib.Field.t_with_perm ->
    t -> Id.t -> 'b) ->
fd:('b ->
    ([< `Read | `Set_and_create ], t, Fd.t) Fieldslib.Field.t_with_perm ->
    t -> Fd.t -> 'c) ->
monitor:('c ->
         ([< `Read | `Set_and_create ], t, Import.Monitor.t)
         Fieldslib.Field.t_with_perm -> t -> Import.Monitor.t -> 'd) ->
background_writer_state:('d ->
                         ([< `Read | `Set_and_create ], t,
                          [ `Not_running | `Running | `Stopped_permanently ])
                         Fieldslib.Field.t_with_perm ->
                         t ->
                         [ `Not_running | `Running | `Stopped_permanently ] ->
                         'e) ->
syscall:('e ->
         ([< `Read | `Set_and_create ], t,
          [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ])
         Fieldslib.Field.t_with_perm ->
         t -> [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] -> 'f) ->
bytes_received:('f ->
                ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
                Fieldslib.Field.t_with_perm -> t -> Core.Std.Int63.t -> 'g) ->
bytes_written:('g ->
               ([< `Read | `Set_and_create ], t, Core.Std.Int63.t)
               Fieldslib.Field.t_with_perm -> t -> Core.Std.Int63.t -> 'h) ->
scheduled:('h ->
           ([< `Read | `Set_and_create ], t,
            (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
            Core.Std.Dequeue.t Core.Std.sexp_opaque)
           Fieldslib.Field.t_with_perm ->
           t ->
           (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
           Core.Std.Dequeue.t Core.Std.sexp_opaque -> 'i) ->
scheduled_bytes:('i ->
                 ([< `Read | `Set_and_create ], t, int)
                 Fieldslib.Field.t_with_perm -> t -> int -> 'j) ->
buf:('j ->
     ([< `Read | `Set_and_create ], t,
      Core.Std.Bigstring.t Core.Std.sexp_opaque)
     Fieldslib.Field.t_with_perm ->
     t -> Core.Std.Bigstring.t Core.Std.sexp_opaque -> 'k) ->
scheduled_back:('k ->
                ([< `Read | `Set_and_create ], t, int)
                Fieldslib.Field.t_with_perm -> t -> int -> 'l) ->
back:('l ->
      ([< `Read | `Set_and_create ], t, int) Fieldslib.Field.t_with_perm ->
      t -> int -> 'm) ->
flushes:('m ->
         ([< `Read | `Set_and_create ], t,
          (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
          Core.Std.sexp_opaque)
         Fieldslib.Field.t_with_perm ->
         t ->
         (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
         Core.Std.sexp_opaque -> 'n) ->
close_state:('n ->
             ([< `Read | `Set_and_create ], t,
              [ `Closed | `Closed_and_flushing | `Open ])
             Fieldslib.Field.t_with_perm ->
             t -> [ `Closed | `Closed_and_flushing | `Open ] -> 'o) ->
close_finished:('o ->
                ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
                Fieldslib.Field.t_with_perm -> t -> unit Import.Ivar.t -> 'p) ->
producers_to_flush_at_close:('p ->
                             ([< `Read | `Set_and_create ], t,
                              (unit -> unit Import.Deferred.t) Core.Std.Bag.t)
                             Fieldslib.Field.t_with_perm ->
                             t ->
                             (unit -> unit Import.Deferred.t) Core.Std.Bag.t ->
                             'q) ->
flush_at_shutdown_elt:('q ->
                       ([< `Read | `Set_and_create ], t,
                        t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option)
                       Fieldslib.Field.t_with_perm ->
                       t ->
                       t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option -> 'r) ->
check_buffer_age:('r ->
                  ([< `Read | `Set_and_create ], t,
                   t Core.Std.sexp_opaque Check_buffer_age'.t
                   Core.Std.Bag.Elt.t option)
                  Fieldslib.Field.t_with_perm ->
                  t ->
                  t Core.Std.sexp_opaque Check_buffer_age'.t
                  Core.Std.Bag.Elt.t option -> 's) ->
consumer_left:('s ->
               ([< `Read | `Set_and_create ], t, unit Import.Ivar.t)
               Fieldslib.Field.t_with_perm -> t -> unit Import.Ivar.t -> 't) ->
raise_when_consumer_leaves:('t ->
                            ([< `Read | `Set_and_create ], t, bool)
                            Fieldslib.Field.t_with_perm -> t -> bool -> 'u) ->
open_flags:('u ->
            ([< `Read | `Set_and_create ], t, open_flags Import.Deferred.t)
            Fieldslib.Field.t_with_perm ->
            t -> open_flags Import.Deferred.t -> 'v) ->
'v
type writer = t
val sexp_of_writer : writer -> Sexplib.Sexp.t
val set_raise_when_consumer_leaves : t -> bool -> unit
val bytes_to_write : t -> int
val is_stopped_permanently : t -> bool
val iovecs_length : ('a IOVec.t * 'b) Core.Std.Dequeue.t -> int
val invariant : t Core.Std.sexp_opaque -> unit
module Check_buffer_age : sig .. end
type t = writer Check_buffer_age'.t Core.Std.Bag.Elt.t option
val dummy : t
val create : writer -> maximum_age:[ `At_most of Core.Std.Time.Span.t | `Unlimited ] -> t
val destroy : t -> unit
val too_old : t -> unit Import.Deferred.t
val flushed_time : t -> Core.Std.Time.t Async_kernel.Deferred.t
val flushed : t -> unit Import.Deferred.t
val set_fd : t -> Fd.t -> unit Async_kernel.Deferred.t
val consumer_left : t -> unit Import.Ivar.Deferred.t
val close_finished : t -> unit Import.Ivar.Deferred.t
val is_closed : t -> bool
val is_open : t -> bool
val writers_to_flush_at_shutdown : t Core.Std.sexp_opaque Core.Std.sexp_opaque Core.Std.sexp_opaque
Core.Std.sexp_opaque Core.Std.sexp_opaque Core.Std.Bag.t
val final_flush : ?force:unit Import.Deferred.t -> t -> unit Import.Deferred.t
val close : ?force_close:unit Import.Deferred.t -> t -> unit Import.Ivar.Deferred.t
val fill_flushes : t -> unit
val stop_permanently : t -> unit
val die : t -> Core.Std.Error.t -> 'a
type buffer_age_limit = [ `At_most of Core.Std.Time.Span.t | `Unlimited ]
val __buffer_age_limit_of_sexp__ : Sexplib.Sexp.t -> buffer_age_limit
val buffer_age_limit_of_sexp : Sexplib.Sexp.t -> buffer_age_limit
val sexp_of_buffer_age_limit : buffer_age_limit -> Sexplib.Sexp.t
val bin_size_buffer_age_limit : [> `At_most of Core.Std.Time.Span.t ] -> int
val bin_write_buffer_age_limit : Core.Std.Bin_prot.Common.buf ->
pos:Core.Std.Bin_prot.Common.pos ->
[< `At_most of Core.Std.Time.Span.t | `Unlimited ] ->
Core_kernel.Std.Bin_prot.Common.pos
val bin_writer_buffer_age_limit : [< `At_most of Core.Std.Time.Span.t | `Unlimited > `At_most ]
Core.Std.Bin_prot.Type_class.writer
val __bin_read_buffer_age_limit__ : Core_kernel.Std.Bin_prot.Common.buf ->
pos_ref:Core_kernel.Std.Bin_prot.Common.pos_ref ->
int -> [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val bin_read_buffer_age_limit : Core.Std.Bin_prot.Common.buf ->
pos_ref:Core.Std.Bin_prot.Common.pos_ref ->
[> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val bin_reader_buffer_age_limit : [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
Core.Std.Bin_prot.Type_class.reader
val bin_buffer_age_limit : [ `At_most of Core.Std.Time.Span.t | `Unlimited ]
Core.Std.Bin_prot.Type_class.t
val create : ?buf_len:int ->
?syscall:[ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] ->
?buffer_age_limit:[ `At_most of Core.Std.Time.Span.t | `Unlimited ] ->
?raise_when_consumer_leaves:bool -> Fd.t -> t
val set_buffer_age_limit : writer -> [ `At_most of Core.Std.Time.Span.t | `Unlimited ] -> unit
val of_out_channel : Core.Std.Out_channel.t -> Fd.Kind.t -> t
val ensure_can_write : t -> unit
val open_file : ?append:bool ->
?close_on_exec:bool ->
?perm:Unix.file_perm -> string -> t Async_kernel.Deferred.t
val with_close : t -> f:(unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val with_writer_exclusive : t -> (unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val with_file : ?perm:Unix.file_perm ->
?append:bool ->
?exclusive:bool ->
string -> f:(t -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val got_bytes : t -> int -> unit
val add_iovec : t ->
[ `Destroy | `Keep ] ->
Core.Std.Bigstring.t IOVec.t -> count_bytes_as_received:bool -> unit
val schedule_unscheduled : t -> [ `Destroy | `Keep ] -> unit
val dummy_iovec : IOVec.bigstring IOVec.t
val mk_iovecs : t -> IOVec.bigstring IOVec.t Core.Std.Array.t * bool * int
val thread_io_cutoff : int
val fd_closed : t -> unit
val start_write : t -> unit
val write_when_ready : t -> unit
val write_finished : t -> int -> unit
val maybe_start_writer : t -> unit
val give_buf : t -> int -> Core.Std.Bigstring.t Core.Std.sexp_opaque * int
val write_gen : length:('a -> int) ->
blit_to_bigstring:('a, Core.Std.Bigstring.t) Core.Std.Blit.blit ->
?pos:int -> ?len:int -> t -> 'a -> unit
val write : ?pos:int -> ?len:int -> t -> Core.Std.String.t -> unit
val write_bigstring : ?pos:int -> ?len:int -> t -> Core.Std.Bigstring.t -> unit
val write_iobuf : ?pos:int -> ?len:int -> t -> ('a, 'b) Core.Std.Iobuf.t -> unit
val write_substring : t -> Core.Std.Substring.t -> unit
val write_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val writef : t -> ('a, unit, string, unit) format4 -> 'a
val to_formatter : t -> Format.formatter
val write_char : t -> char -> unit
val newline : t -> unit
val write_line : t -> Core.Std.String.t -> unit
val write_byte : t -> Core.Std.Int.t -> unit
val write_sexp : ?hum:bool -> t -> Core.Std.Sexp.t -> unit
include sig .. end
val write_bin_prot : t -> 'a Core.Std.Bin_prot.Type_class.writer -> 'a -> unit
val write_marshal : t -> flags:Marshal.extern_flags list -> 'a -> unit
val send : t -> Core.Std.String.t -> unit
val schedule_iovec : t -> Core.Std.Bigstring.t IOVec.t -> unit
val schedule_iovecs : t -> Core.Std.Bigstring.t IOVec.t Core.Std.Queue.t -> unit
val schedule_bigstring : t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unit
val schedule_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val fsync : t -> unit Async_kernel.Deferred.t
val fdatasync : t -> unit Async_kernel.Deferred.t
val write_bin_prot : t -> 'a Core.Std.Bin_prot.Type_class.writer -> 'a -> unit
val send : t -> Core.Std.String.t -> unit
val schedule_iovec : t -> Core.Std.Bigstring.t IOVec.t -> unit
val schedule_iovecs : t -> Core.Std.Bigstring.t IOVec.t Core.Std.Queue.t -> unit
val schedule_bigstring : t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unit
val write : ?pos:int -> ?len:int -> t -> Core.Std.String.t -> unit
val write_line : t -> Core.Std.String.t -> unit
val writef : t -> ('a, unit, string, unit) format4 -> 'a
val write_marshal : t -> flags:Marshal.extern_flags list -> 'a -> unit
val write_sexp : ?hum:bool -> t -> Core.Std.Sexp.t -> unit
val write_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val write_substring : t -> Core.Std.Substring.t -> unit
val write_byte : t -> Core.Std.Int.t -> unit
val write_char : t -> char -> unit
val newline : t -> unit
val stdout_and_stderr : (t * t) lazy_t
val stdout : t lazy_t
val stderr : t lazy_t
val apply_umask : int -> int
val with_file_atomic : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string -> f:(t -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val save : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string -> contents:Core.Std.String.t -> unit Async_kernel.Deferred.t
val save_lines : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string -> Core.Std.String.t Core.Std.List.t -> unit Async_kernel.Deferred.t
val sexp_to_buffer : ?hum:bool -> buf:Buffer.t -> Core.Std.Sexp.t -> unit
val save_sexp : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
?hum:bool -> string -> Core.Std.Sexp.t -> unit Async_kernel.Deferred.t
val with_flushed_at_close : t ->
flushed:(unit -> unit Import.Deferred.t) ->
f:(unit -> 'a Async_kernel.Deferred.t) -> 'a Async_kernel.Deferred.t
val make_transfer : ?stop:unit Import.Deferred.t ->
t ->
'a Import.Pipe.Reader.t ->
('a Core.Std.Queue.t ->
 cont:(unit ->
       [> `Finished of unit | `Repeat of unit ] Async_kernel.Deferred.t) ->
 [ `Finished of unit | `Repeat of unit ] Async_kernel.Deferred.t) ->
unit Async_kernel.Deferred.t
val transfer : ?stop:unit Import.Deferred.t ->
t -> 'a Import.Pipe.Reader.t -> ('a -> unit) -> unit Async_kernel.Deferred.t
val transfer' : ?stop:unit Import.Deferred.t ->
t ->
'a Import.Pipe.Reader.t ->
('a Core.Std.Queue.t -> unit Async_kernel.Deferred.t) ->
unit Async_kernel.Deferred.t
val pipe : t -> Core.Std.String.t Import.Pipe.Writer.t