package riot

  1. Overview
  2. Docs

Impl is the module type of the generic server base implementations. You can use this type when defining new gen servers like this:

type args = int
module Server : Gen_server.Impl with type args = args = struct
  type nonrec args = args
  type state = { status : int }

  let init _args = Gen_server.Ok { status = 1 }

  (* ... *)
end
type args
type state
val init : args -> state init_result
val handle_call : 'res. 'res req -> Pid.t -> state -> 'res * state
val handle_info : Message.t -> state -> unit
OCaml

Innovation. Community. Security.