VarLenPeek

sealed interface VarLenPeek<out T>

Result of peeking a self-delimiting value from a StreamProcessor prefix without consuming bytes. Modeled as a sum type (not a nullable) so the two states are explicit and exhaustive.

Inheritors

Types

Link copied to clipboard
data class Decoded<out T>(val value: T, val byteCount: Int) : VarLenPeek<T>

The decoded value and the exact number of bytes it occupies on the wire.

Link copied to clipboard

Not enough bytes are buffered yet to determine the value or its length.