def build.v2
bend-kit-migrate@0.3.0.0 · migrate.bend:552
import bend-kit-migrate@0.3.0.0/migrate.bend as Migrate
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
552def build.v2(s: Slots) -> Result<&1, &1, Error, Record>:
553 Slots{ve, i, p, mc, a, c, pe, st, n} = s
554 do Result<&1, &1, Error, Record>:
555 u1 : Unit <- unexpected(mc, KMonthlyCents{})
556 u2 : Unit <- unexpected(a, KActive{})
557 id : Bytes.Bytes <- need.num(i, KId{})
558 plan : Bytes.Bytes <- need.str(p, KPlan{})
559 cents : Bytes.Bytes <- need.num(c, KCents{})
560 period : Period <- opt.period(pe)
561 status : Status <- need.status(st)
562 note : Maybe<&1, Bytes.Bytes> <- opt.str(n, KNote{})
563 V2.finish(u32.read(id), plan, u32.read(cents), period, status, note)