def parse.record.tag
mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:699
import mylsm-lsm-store@0.6.0.1/src/SstFile.bend as SstFile
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
699def parse.record.tag(
700 pair: Bytes.Cursor & Maybe<&2, U32>
701) -> Bytes.Cursor & Result<&1, &1, Error, ParsedRecord>:
702 match pair:
703 case (cursor, Some{0}):
704 parse.record.key.length(Bytes.Cursor.u32be(cursor), 0)
705 case (cursor, Some{1}):
706 parse.record.key.length(Bytes.Cursor.u32be(cursor), 1)
707 case (cursor, Some{_}):
708 (cursor, Fail{Malformed{}})
709 case (cursor, None{}):
710 (cursor, Fail{Malformed{}})