Io.payload.result: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend as Io Lines 510-527 of mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend&start_line=510&end_line=527 import Base import mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend as Protocol import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def payload.result( header: Bytes.Bytes, pair: File & Result<&1, &1, U32 & String, ExactResult>, max_payload: Nat ) -> IO(File & Result<&1, &1, Error, Protocol.Request>): match pair: case (file, Fail{(code, message)}): IO.pure(File & Result<&1, &1, Error, Protocol.Request>, (file, Fail{host.error(code, message)})) case (file, Done{ExactResult{bytes, complete}}): match complete: case False{}: IO.pure(File & Result<&1, &1, Error, Protocol.Request>, (file, Fail{Truncated{}})) case True{}: IO.pure(File & Result<&1, &1, Error, Protocol.Request>, frame.result(file, Protocol.decode(Bytes.concat([header, bytes]), max_payload))) Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=File 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=List 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=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=concat https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend&name=ExactResult https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend&name=frame.result https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Io.bend&name=host.error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend&name=Request https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend&name=decode