package streamable

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('state_part, 'update_part) t
val write_state_without_pushback_exn : ('state_part, _) t -> 'state_part -> [ `Ok | `Closed ]

Write a part of the initial state. Returns `Closed if t is closed.

Will raise if the initial state has already been finalised.

val finalise_state_without_pushback_exn : (_, _) t -> [ `Ok | `Closed ]

Finalise the initial state, indicating there are no more parts. Returns `Closed if t is closed.

Will raise if the initial state has already been finalised.

val is_state_finalised : (_, _) t -> bool
val state_finalised : (_, _) t -> unit Async_kernel.Deferred.t
val write_update_without_pushback_exn : (_, 'update_part) t -> 'update_part -> [ `Ok | `Closed ]

Write a part of an update. Returns `Closed if t is closed.

Will raise if the initial state has not yet been finalised.

val finalise_update_without_pushback_exn : (_, _) t -> [ `Ok | `Closed ]

Finalise the current update. Returns `Closed if t is closed.

Will raise if the initial state has not yet been finalised.

val close : (_, _) t -> unit
val closed : (_, _) t -> unit Async_kernel.Deferred.t
val flushed : (_, _) t -> unit Async_kernel.Deferred.t
val is_closed : (_, _) t -> bool
module Expert : sig ... end

Expert allows the serialisation of parts to occur separately from the writing of parts. While you are able to write any bigstring to the pipe rpc with this interface, you should only write state parts until you finalise the state, and then after that you should only write update parts.

module Group : sig ... end
OCaml

Innovation. Community. Security.