Up

Module type Datum

Signature

type t
include Datumable with type datum = t
type datum = t
include Versions
val low_version : Version.t
val prod_version : Version.t
val test_version : Version.t
val lookup_marshal_fun : Version.t -> (datum 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. 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 : Version.t -> (datum 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 one message 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.