def feed.if.valid

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:1708

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

1708def feed.if.valid(
1709  invalid: Bool,
1710  chunks: List<&1, Bytes.Bytes>,
1711  total: U32,
1712  chunk: Bytes.Bytes
1713) -> Decoder:
1714  match invalid:
1715    case True{}:
1716      Dec{chunks, total, True{}}
1717    case False{}:
1718      feed.chunk(Dec{chunks, total, False{}}, Bytes.length(chunk))

Uses (7)

Used by (1)