Websocket.bytes.fits: def of bend-kit-websocket@0.4.0.0 Import: import bend-kit-websocket@0.4.0.0/websocket.bend as Websocket Lines 537-540 of bend-kit-websocket@0.4.0.0/websocket.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-websocket@0.4.0.0/websocket.bend&start_line=537&end_line=540 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes # hs + len octets fit in end - pos exactly when this holds (Bytes law fits_exact); see law cut_exact. def bytes.fits(c: Bytes.Cursor, +hs: U32, +len: U32) -> Bytes.Cursor & Bool: Bytes.Cursor{b, +pos, +start, +end} = c (Bytes.Cursor{b, pos, start, end}, Bytes.fits((end - pos : U32), hs, len)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=fits