def read_at.exhausted

mylsm-lsm-store@0.6.0.1 · src/Fs.bend:263

import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as StorageBytes

263# Returns an explicit error if bounded progress unexpectedly runs out.
264def read_at.exhausted(
265  state: ReadAtState
266) -> IO(
267  File & Result<&1, &1, U32 & String, StorageBytes.Bytes>
268):
269  match state:
270    case ReadAtNeed{file, _, _, _}:
271      IO.pure(File & Result<&1, &1, U32 & String, StorageBytes.Bytes>,
272        (file, Fail{(7, "positional read exhausted its progress budget")}))
273    case ReadAtRead{pair, _, _, _}:
274      match pair:
275        case (file, _):
276          IO.pure(File & Result<&1, &1, U32 & String, StorageBytes.Bytes>,
277            (file, Fail{(7, "positional read exhausted its progress budget")}))
278    case ReadAtPacked{file, _, _, _, _}:
279      IO.pure(File & Result<&1, &1, U32 & String, StorageBytes.Bytes>,
280        (file, Fail{(7, "positional read exhausted its progress budget")}))

Uses (10)

Used by (1)