fs2.data.cbor.low

Type members

Classlikes

sealed
trait CborItem

A low-level CBOR item. Items are emitted as soon as they are complete They can be used for reading/writing streamed CBOR data, including indefinite length arrays, maps, or strings.

A low-level CBOR item. Items are emitted as soon as they are complete They can be used for reading/writing streamed CBOR data, including indefinite length arrays, maps, or strings.

Companion
object
object CborItem
Companion
class

Value members

Concrete methods

def items[F[_]](implicit F: RaiseThrowable[F]): (F, Byte) => CborItem

Parses the input byte stream into a sequence of low-level CBOR items. This allows for parsing arbitrary long and deep CBOR data. No AST is built.

Parses the input byte stream into a sequence of low-level CBOR items. This allows for parsing arbitrary long and deep CBOR data. No AST is built.

def toBinary[F[_]](implicit F: RaiseThrowable[F]): (F, CborItem) => Byte

Transforms a stream of CBOR items into the binary representation.

Transforms a stream of CBOR items into the binary representation.

The resulting stream fails as soon as a problem is encounter.

def toNonValidatedBinary[F[_]]: (F, CborItem) => Byte

Transforms a stream of CBOR items into the binary representation.

Transforms a stream of CBOR items into the binary representation.

This produces a valid byte stream if the input item stream is well-formed, otherwise result is uncertain and will eventually produce an invalid byte sequence.

Use this pipe if you are sure the stream is well-formed or if it does not matter to produce ill-formed streams.

Since no validation is performed, this pipe is more efficient and allows for better throughput.

def validate[F[_]](implicit F: RaiseThrowable[F]): (F, CborItem) => CborItem

Validates the stream of CBOR items, emitting them unchanged.

Validates the stream of CBOR items, emitting them unchanged.

The resulting stream is failed as soon as a problem is encountered.