def Utf8.snapshot.get.result

mylsm-lsm-store@0.6.0.1 · mylsm.bend:2394

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
import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as Utf8Codec

2394def Utf8.snapshot.get.result(
2395  pair: Bytes.Snapshot & Result<&1, &1, Bytes.Error, Maybe<&1, PackedBytes.Bytes>>
2396) -> Utf8.Snapshot & Result<&1, &1, Utf8.Error, Maybe<&1, String>>:
2397  match pair:
2398    case (snapshot, Fail{error}): (Utf8Snapshot{snapshot}, Fail{Utf8Failure{error}})
2399    case (snapshot, Done{None{}}): (Utf8Snapshot{snapshot}, Done{None{}})
2400    case (snapshot, Done{Some{value}}):
2401      Utf8.snapshot.get.decoded(snapshot, Utf8Codec.to_string_strict(value))

Uses (12)

Used by (1)