module type Basic = sig
.. end
Basic
is the minimal interface you need to provide to make a packed array for a new
type.
type
elt
type
t
val length : t -> int
val unsafe_get : t -> int -> elt
val of_array : elt array -> t
val unsafe_slice : t -> pos:int -> len:int -> t
val bin_elt : elt Bin_prot.Type_class.t
val bin_read_elt : elt Bin_prot.Read.reader
val __bin_read_elt__ : (int -> elt) Bin_prot.Read.reader
val bin_reader_elt : elt Bin_prot.Type_class.reader
val bin_size_elt : elt Bin_prot.Size.sizer
val bin_write_elt : elt Bin_prot.Write.writer
val bin_writer_elt : elt Bin_prot.Type_class.writer
val elt_of_sexp : Sexplib.Sexp.t -> elt
val sexp_of_elt : elt -> Sexplib.Sexp.t