def next.start

bend-kit-journal@0.3.1.0 · journal.bend:86

import bend-kit-journal@0.3.1.0/journal.bend as Journal
import Base

86# The two length fields are checked before the payload is waited for, so a damaged length is
87# Bad and never a Torn tail that hides the frames after it.
88def next.start(~P: Type, ~S: Type, ~fits: S -> @+at:U32 -> @+n:U32 -> S & Bool, ~u32: S -> @+at:U32 -> S & U32, ~cut: S -> @+hs:U32 -> @+len:U32 -> S & P, ~skip: S -> @+hs:U32 -> @+len:U32 -> S, ~sum: P -> P & U32, +max: U32, r: S & Bool) -> Step<P, S>:
89  (s, both) = r
90  match both:
91    case True{}:
92      next.len(~P, ~S, ~fits, ~u32, ~cut, ~skip, ~sum, max, u32(s, 0))
93    case False{}:
94      Short{s}

Uses (6)

Used by (1)