module Unpack_one : sig ... endval sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t
include Base.Invariant.S1 with type 'a t := 'a t
val invariant : ('a -> unit) -> 'a t -> unit
val create : 'a Unpack_one.t -> 'a tval create_bin_prot : 'a Bin_prot.Type_class.reader -> 'a tcreate_bin_prot readerreturns an unpack buffer that unpacks the "size-prefixed" bin_prot encoding, in which a value is encoded by first writing the length of the bin_prot data as a 64-bit int, and then writing the bin_prot data itself.
val is_empty : _ t -> bool Core_kernel.Or_error.tis_emptyreturnstrueif all the data fed intothas been unpacked into values;falseifthas unconsumed bytes or partially unpacked data.is_emptyreturns an error ifthas encountered an unpacking error.
val feed : ?pos:int -> ?len:int -> _ t -> Core_kernel.Bigstring.t -> unit Core_kernel.Or_error.tfeed t buf ?pos ?lenadds the specified substring ofbuftot's buffer. It returns an error ifthas encountered an unpacking error.
val feed_string : ?pos:int -> ?len:int -> _ t -> string -> unit Core_kernel.Or_error.tval feed_bytes : ?pos:int -> ?len:int -> _ t -> Core_kernel.Bytes.t -> unit Core_kernel.Or_error.tval unpack_into : 'a t -> 'a Core_kernel.Queue.t -> unit Core_kernel.Or_error.tunpack_into t qunpacks all the values that it can fromtand enqueues them inq. If there is an unpacking error,unpack_intoreturns an error, and subsequentfeedand unpack operations ontwill return that same error -- i.e. no more data can be fed to or unpacked fromt.
val unpack_iter : 'a t -> f:('a -> unit) -> unit Core_kernel.Or_error.tunpack_iter t ~funpacks all the values that it can fromt, callingfon each value as it's unpacked. If there is an unpacking error (including iffraises),unpack_iterreturns an error, and subsequentfeedand unpack operations ontwill return that same error -- i.e., no more data can be fed to or unpacked fromt.Behavior is unspecified if
foperates ont.
val debug : bool Caml.refdebugcontrols whether invariants are checked at each call. Setting this totruecan make things very slow.