def parse.header.entries.valid

mylsm-lsm-store@0.6.0.1 · src/ByteSstFile.bend:899

import mylsm-lsm-store@0.6.0.1/src/ByteSstFile.bend as ByteSstFile
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

899# Converts a root comparison over raw header, checksum, and index bytes into a result.
900def parse.header.entries.valid(
901  cursor: Bytes.Cursor,
902  +size: U32,
903  +level: U32,
904  +total: U32,
905  +payload_len: U32,
906  +entries: U32,
907  valid: Bool
908) -> Result<&1, &1, Error, PayloadWords>:
909  match valid:
910    case True{}:
911      Done{PayloadWords{cursor, size, level, total, payload_len, entries}}
912    case False{}:
913      Fail{Malformed{}}

Uses (6)

Used by (1)