def Utf8.scan.prefix.encoded
mylsm-lsm-store@0.6.0.1 · mylsm.bend:2246
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsm
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as PackedBytes
2246def Utf8.scan.prefix.encoded(
2247 handle: Bytes.Handle,
2248 encoded: Result<&1, &1, Utf8.Error, PackedBytes.Bytes>
2249) -> IO(Utf8.Handle & Result<&1, &1, Utf8.Error, Utf8.Cursor>):
2250 match encoded:
2251 case Fail{error}:
2252 IO.pure(Utf8.Handle & Result<&1, &1, Utf8.Error, Utf8.Cursor>,
2253 (Utf8Handle{handle}, Fail{error}))
2254 case Done{prefix}:
2255 do IO<Utf8.Handle & Result<&1, &1, Utf8.Error, Utf8.Cursor>>:
2256 pair : Bytes.Handle & Result<&1, &1, Bytes.Error, Bytes.Cursor> <-
2257 Bytes.scan_prefix(handle, prefix)
2258 return Utf8.scan.prefix.opened(pair)