def encode.digest.checked
mylsm-lsm-store@0.6.0.1 · src/Manifest.bend:172
import mylsm-lsm-store@0.6.0.1/src/Manifest.bend as Manifest
import Base
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
172def encode.digest.checked(pair: Bytes.Bytes & Bytes.Bytes) -> Result<&1, &1, Error, Bytes.Bytes>:
173 match pair:
174 case (packed, size_packed):
175 Bool.pick(Result<&1, &1, Error, Bytes.Bytes>,
176 U32.is_le(bytes.length(Bytes.length(size_packed)), StorageBytes.MAX_MANIFEST_BYTES()),
177 Done{packed}, Fail{TooLarge{}})