package atdgen-runtime

  1. Overview
  2. Docs
type 'a reader = Bi_inbuf.t -> 'a

Type of a read_ function as produced by atdgen -biniou.

type 'a writer = Bi_outbuf.t -> 'a -> unit

Type of a write_ function as produced by atdgen -biniou.

val from_channel : ?len:int -> ?shrlen:int -> 'a reader -> Stdlib.in_channel -> 'a

Read a biniou value from a channel.

  • parameter len

    input buffer length.

  • parameter shrlen

    obsolete and ignored.

val from_file : ?len:int -> ?shrlen:int -> 'a reader -> string -> 'a

Read a biniou value from a file.

  • parameter len

    input buffer length.

  • parameter shrlen

    obsolete and ignored.

val to_channel : ?len:int -> ?shrlen:int -> 'a writer -> Stdlib.out_channel -> 'a -> unit

Write a biniou value to a channel.

  • parameter len

    output buffer length.

  • parameter shrlen

    obsolete and ignored.

val to_file : ?len:int -> ?shrlen:int -> 'a writer -> string -> 'a -> unit

Write a biniou value to a file.

  • parameter len

    output buffer length.

  • parameter shrlen

    obsolete and ignored.