def serve.stream.abort
import bend-kit-http@0.38.5.0/http.bend as Httpimport Base
6628# The application consumes its real affine state on unsuccessful upload paths.
6629# An abort that does not return remains admitted work, not a fabricated drain.
6630def serve.stream.abort(~S: Type, ~abort: S -> StreamAbort -> IO(Unit),
6631 reason: StreamAbort, state: Maybe<&1, S & Bool>) -> IO(Unit):
6632 match state:
6633 case None{}: IO.pure(Unit, Unit{})
6634 case Some{pair}:
6635 (value, dropped) = pair
6636 abort(value, reason)