Up

Module Ignored

An Ignored.t is an unusable value with special bin-prot converters. The reader reads the size and drops that much data from the buffer. Writing is not supported, however the size of t is kept, so bin_size_t is available.

This can be used in similar situations to Opaque.t. If instead of transforming a bin-prot stream, you are simply consuming it (and not passing it on anywhere), there is no need to remember the bin-prot representation for the bits you're ignoring. E.g. if you wish to extract a subset of information from a bin-prot file, which contains the serialized representation of some type T (or a bunch of Ts in a row, or something similar), you can define a type which is similar to T but has various components replaced with Ignored.t.

Signature

type t
val bin_size_t : t Size.sizer
val bin_read_t : t Read.reader
val __bin_read_t__ : (int -> t) Read.reader
val bin_reader_t : t Type_class.reader