StreamDecoder

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def emit[A](a: A): StreamDecoder[A]

Stream decoder that emits a single A and consumes no bits from the input.

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.

Stream decoder that emits the supplied A values and consumes no bits from the input.

def ignore(bits: Long): StreamDecoder[Nothing]

Creates a stream decoder that ignores the specified number of bits.

Creates a stream decoder that ignores the specified number of bits.

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.

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 many[A](decoder: Decoder[A]): StreamDecoder[A]

Creates a stream decoder that repeatedly decodes A values using the supplied decoder.

Creates a stream decoder that repeatedly decodes A values using the supplied decoder.

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.

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 raiseError(cause: Throwable): StreamDecoder[Nothing]

Creates a stream decoder that fails decoding with the specified exception.

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.

Creates a stream decoder that fails decoding with the specified error.

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.

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 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.

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.

Concrete fields

val empty: StreamDecoder[Nothing]

Stream decoder that emits no elements.

Stream decoder that emits no elements.