def close.utf8
import bend-kit-websocket@0.4.0.0/websocket.bend as Websocketimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
726def close.utf8(+c: U32, r: Bytes.Bytes & Bool) -> Result<&1, &1, U32 & String, U32 & Bytes.Bytes>:
727 (b, ok) = r
728 match ok:
729 case True{}:
730 Done{(c, b)}
731 case False{}:
732 Fail{(1007, "close reason is not UTF-8")}