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

Function writeFrame

packages/effect/src/encoding/SchemaBinary.ts:4336–4342  ·  view source on GitHub ↗
(ctx: EncodeContext, layout: Layout, value: unknown, mode: Mode, w: Writer)

Source from the content-addressed store, hash-verified

4334let pooledWriter: Writer | undefined = new Writer()
4335
4336function writeFrame(ctx: EncodeContext, layout: Layout, value: unknown, mode: Mode, w: Writer) {
4337 const mark = w.beginSized()
4338 w.byte(mode.envelope)
4339 if (mode.positional) w.bytes(mode.fingerprint)
4340 encodeValue(ctx, layout, value, w)
4341 w.endSized(mark)
4342}
4343
4344// One context and one writer across a batch, so the caches built for the
4345// first frame serve the rest and the frames need no second pass to join. The

Callers 1

runFramesFunction · 0.85

Calls 5

beginSizedMethod · 0.80
endSizedMethod · 0.80
encodeValueFunction · 0.70
byteMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected