Module type Versioned_typed_tcp.Datumable

module type Datumable = sig .. end
This module describes the type of a given direction of message flow. For example it might describe the type of messages from the client to the server.

type datum 
include Versioned_typed_tcp.Versions
val lookup_marshal_fun : Versioned_typed_tcp.Version.t ->
(datum Versioned_typed_tcp.marshal_fun, exn)
Core.Std.Result.t
lookup_marshal_fun v This function takes a version v, and returns a function that will downgrade (if necessary) the current version to v and then write it to a bigsubstring. It is perfectly fine if one message becomes zero or more messages as a result of downgrading, this is why the marshal fun returns a list. The contents of these buffers will be copied immediatly, so it is safe to reuse the same bigstring for multiple marshals.
val lookup_unmarshal_fun : Versioned_typed_tcp.Version.t ->
(datum Versioned_typed_tcp.unmarshal_fun, exn)
Core.Std.Result.t
lookup_unmarshal_fun v This function takes a version v, and returns a function that unmarshals a message and upgrades it, returning zero or more messages as a result of the upgrade. The bigsubstring is only guaranteed to contain valid data until the unmarshal function returns, after which it may be overwritten immediatly.