def walk.length.checked

mylsm-lsm-store@0.6.0.1 · src/transfer/LegacyWal.bend:61

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

61# Checks that a nonempty log suffix contains a complete frame-length word.
62def walk.length.checked(
63  cursor: Bytes.Cursor,
64  frames: Nat,
65  copies: Nat & Nat
66) -> WalkState:
67  match copies:
68    case (for_check, retained):
69      HasLength{cursor, retained, frames, Nat.is_le(4n, for_check)}

Uses (6)

Used by (1)