package avro

  1. Overview
  2. Docs

Decoding multiple rows from an input

type 'a t

Decoder for values of type 'a

val make : Input.t -> read:(Input.t -> 'a) -> 'a t

Decoder using the given input, and given row reading function.

val cur_block_remaining_count : _ t -> int

How many items remain in the current block (can be 0 at the beginning)

val next : 'a t -> 'a option

Read next row

High level API

val iter : 'a t -> f:('a -> unit) -> unit
val fold : 'a t -> f:('b -> 'a -> 'b) -> init:'b -> 'b
val to_seq : 'a t -> 'a Stdlib.Seq.t
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
OCaml

Innovation. Community. Security.