package data-encoding

  1. Overview
  2. Docs
type t

The type for a stream, as used in the Binary.read_stream function.

You never need to initialise a stream: one is initialised for you when you use first Binary.read_stream and you may pass a stream around to further calls to Binary.read_stream.

val is_empty : t -> bool

is_empty s is true iff the stream is not currently holding any yet-to-be-decoded bytes. Consequently, reading on that stream will always return Await.