Remaining Bytes
Marks a String field to consume all remaining bytes as UTF-8. Must be the last non-conditional field in the constructor.
@ProtocolMessage
data class LogEntry(
val level: UByte,
@RemainingBytes val message: String, // reads everything after level byte
)Content copied to clipboard