SstStreamIo.read.table.size.limited.decision: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo Lines 398-411 of mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend&start_line=398&end_line=411 import Base import mylsm-lsm-store@0.6.0.1/src/SstReadPolicy.bend as SstReadPolicy import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable def read.table.size.limited.decision( +path: String, +size: Nat, decision: SstReadPolicy.Decision ) -> IO(Result<&1, &1, U32 & String, Sstable.Table>): match decision: case SstReadPolicy.TooSmall{}: IO.pure(Result<&1, &1, U32 & String, Sstable.Table>, Fail{(corruption_error_code(), "malformed SST size")}) case SstReadPolicy.OverBudget{}: IO.pure(Result<&1, &1, U32 & String, Sstable.Table>, Fail{(resource_limit_error_code(), "SST exceeds configured byte budget")}) case SstReadPolicy.WithinBudget{}: read.table.size.checked(path, size, True{}) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstReadPolicy.bend&name=Decision https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend&name=corruption_error_code https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend&name=read.table.size.checked https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend&name=resource_limit_error_code https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&name=Table