def next.trailer.state

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:1678

import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base

1678def next.trailer.state(file: File, state: State) -> IO(Result<&1, &1, U32 & String, Step>):
1679  match state:
1680    case State{_, _, +index_offset, +used, +total, _, _, +decoded, _, _, _, selected}:
1681      match selected:
1682        case True{}: next.selected.end(file)
1683        case False{}:
1684          next.trailer.ready(file, state,
1685            Nat.is_eq(Nat.add(20n, used), index_offset) && U32.is_eq(total, decoded))

Uses (15)

Used by (1)