MCPcopy Create free account
hub / github.com/Effect-TS/effect / decodeStructRun

Function decodeStructRun

packages/effect/src/encoding/SchemaBinary.ts:4798–4810  ·  view source on GitHub ↗
(plan: RunPlan, count: number, r: Reader)

Source from the content-addressed store, hash-verified

4796}
4797
4798function decodeStructRun(plan: RunPlan, count: number, r: Reader): Array<unknown> {
4799 const out: Array<unknown> = new Array(count)
4800 const shapes: Array<Array<RunSlot>> = []
4801 const tables: Array<Array<unknown> | undefined> = []
4802 for (let i = 0; i < count; i++) {
4803 issuePath[issuePathLen++] = i
4804 const saved = r.enter(r.uvarint())
4805 out[i] = decodeRunRow(plan, shapes, tables, r)
4806 r.exit(saved)
4807 issuePathLen--
4808 }
4809 return out
4810}
4811
4812// A positional shape is the presence mask over layout field order.
4813function positionalRunShape(struct: StructLayout, r: Reader): Array<RunSlot> {

Callers 1

decodeArrayFunction · 0.85

Calls 4

decodeRunRowFunction · 0.85
enterMethod · 0.80
exitMethod · 0.80
uvarintMethod · 0.45

Tested by

no test coverage detected