def serve.stream.abort

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

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

6636# The application consumes its real affine state on unsuccessful upload paths.
6637# An abort that does not return remains admitted work, not a fabricated drain.
6638def serve.stream.abort(~S: Type, ~abort: S -> StreamAbort -> IO(Unit),
6639  reason: StreamAbort, state: Maybe<&1, S & Bool>) -> IO(Unit):
6640  match state:
6641    case None{}: IO.pure(Unit, Unit{})
6642    case Some{pair}:
6643      (value, dropped) = pair
6644      abort(value, reason)

Uses (8)

Used by (1)