def hs.step

bend-kit-http@0.38.2.0 · http.bend:1309

import bend-kit-http@0.38.2.0/http.bend as Http
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

1309def hs.step(+head: Bool, st: Hs) -> Hs:
1310  match st:
1311    case HsSeek{buf, +from, +k}:
1312      Bytes.Bytes{+len, b} = buf
1313      hs.seek(head, k, len, from, Bytes.slice(Bytes.Bytes{len, b}, from, (len - from : U32)))
1314    case HsWait{buf, k}:
1315      HsWait{buf, k}
1316    case HsBad{}:
1317      HsBad{}
1318    case HsRes{res, rb, rest}:
1319      HsRes{res, rb, rest}

Uses (7)

Used by (1)