StreamDecoder

Companion
class
class Object
trait Matchable
class Any

Value members

Methods

def emit[A](a: A): StreamDecoder[A]
Stream decoder that emits a single A and consumes no bits from the input.
def emits[A](as: Iterable[A]): StreamDecoder[A]
Stream decoder that emits the supplied A values and consumes no bits from the input.
def once[A](decoder: Decoder[A]): StreamDecoder[A]
Creates a stream decoder that decodes one A using the supplied decoder.
Input bits are buffered until the decoder is able to decode an A.
def many[A](decoder: Decoder[A]): StreamDecoder[A]
Creates a stream decoder that repeatedly decodes A values using the supplied decoder.
def tryOnce[A](decoder: Decoder[A]): StreamDecoder[A]
Creates a stream decoder that attempts to decode one A using the supplied decoder.
Input bits are buffered until the decoder is able to decode an A.
If decoding fails, the bits are not consumed and the stream decoder yields no values.
def tryMany[A](decoder: Decoder[A]): StreamDecoder[A]
Creates a stream decoder that repeatedly decodes A values until decoding fails.
If decoding fails, the read bits are not consumed and the stream decoder terminates,
having emitted any successfully decoded values earlier.
def raiseError(cause: Throwable): StreamDecoder[Nothing]
Creates a stream decoder that fails decoding with the specified exception.
def raiseError(err: Err): StreamDecoder[Nothing]
Creates a stream decoder that fails decoding with the specified error.
def isolate[A](bits: Long)(decoder: StreamDecoder[A]): StreamDecoder[A]
Creates a stream decoder that reads the specified number of bits and then decodes
them with the supplied stream decoder. Any remainder from the inner stream decoder is
discarded.
def ignore(bits: Long): StreamDecoder[Nothing]
Creates a stream decoder that ignores the specified number of bits.

Fields

val empty: StreamDecoder[Nothing]
Stream decoder that emits no elements.