package cactus

  1. Overview
  2. Docs

Module Default.ValueSource

Sourcetype t

The type for values.

Sourceval t : t Repr.t
Sourceval encode : t -> string

encode is an encoding function. The resultant encoded values must have size encoded_size.

Sourceval encoded_size : int

encoded_size is the size of the result of encode, expressed in number of bytes.

Sourceval decode : string -> t

decode s off is the decoded form of the encoded value at the offset off of string s. Must satisfy decode (encode t) 0 = t.