(ctx: EncodeContext, field: Field, value: unknown, w: Writer)
| 3481 | } |
| 3482 | |
| 3483 | function encodeStructField(ctx: EncodeContext, field: Field, value: unknown, w: Writer) { |
| 3484 | const wire = valueWireCode(field.layout, value, ctx.options) |
| 3485 | const kind = wire % FIELD_WIRE_FACTOR |
| 3486 | if (kind === FIELD_WIRE_SIZED) { |
| 3487 | const mark = w.idAndMark(field.tagBytes) |
| 3488 | encodeValue(ctx, field.layout, value, w) |
| 3489 | w.endSized(mark) |
| 3490 | return |
| 3491 | } |
| 3492 | w.uvarint(field.id * FIELD_WIRE_FACTOR + kind) |
| 3493 | encodeWirePayload(ctx, field.layout, value, wire, w) |
| 3494 | } |
| 3495 | |
| 3496 | function runPresenceMask(plan: RunPlan, obj: Record<string, unknown>): number | undefined { |
| 3497 | const byName = plan.byName |
no test coverage detected