nx_game_page_sink_t221.nx
buildroot/runtime/nx_game_page_sink_t221.nx
about
ORIGINAL proprietary. Owned serialization dependency for the existing game-page emitter.
See knowledge/gates/page-owned-sink-design-t221.md. Primitive qualification only;
the current page template and its raw-buffer callers are not migrated yet.
dependencies 3 imports · 1 importers
imports: nx_buf_dyn.nxnx_itoa_lib.nxnx_base64.nx
imported by: nx_game_page_sink_gate_t221.nx
structs
| 8 | struct GpeSink { bytes:*NxBufOwned, error:i64, max_bytes:i64, scratch:*u8, scratch_cap:i64, } |
consts
| 9 | const GPE_SINK_RECORD_BYTES:i64=__size_of(GpeSink)+NX_BO_BYTES |
| 10 | const GPE_SINK_I64_MIN:i64=0-NX_BO_I64_MAX-1 |
| 11 | const GPE_SINK_BASE64_INPUT_QUANTUM:i64=3 |
| 12 | const GPE_SINK_BASE64_OUTPUT_QUANTUM:i64=4 |
functions
| 15 | func gpe_sink_new(max_bytes:i64)->*GpeSink |
| 23 | func gpe_sink_fail(s:*GpeSink,rc:i64)->i64{if s.error==0{s.error=rc};return s.error} |
| 24 | func gpe_sink_ready(s:*GpeSink)->i64 |
| 32 | func gpe_sink_room(s:*GpeSink,extra:i64)->i64 |
| 40 | func gpe_sink_source(s:*GpeSink,src:*u8,n:i64)->i64 called by 4: gpe_sink_spangpe_sink_textgpe_sink_jsgpe_sink_base64 calls 2: gpe_sink_readygpe_sink_fail |
| 52 | func gpe_sink_span(s:*GpeSink,src:*u8,n:i64)->i64 |
| 57 | func gpe_sink_byte(s:*GpeSink,value:i64)->i64 |
| 65 | func gpe_sink_text(s:*GpeSink,text:*u8,available:i64)->i64 |
| 71 | func gpe_sink_num(s:*GpeSink,value:i64)->i64 called by 1: psg_format calls 5: gpe_sink_readygpe_sink_spangpe_sink_scratch_newnxi_bufgpe_sink_scratch_commit |
| 81 | func gpe_sink_scratch_release(s:*GpeSink)->i64 |
| 87 | func gpe_sink_scratch_new(s:*GpeSink,capacity:i64)->i64 called by 4: gpe_sink_bytegpe_sink_numgpe_sink_jsgpe_sink_base64 calls 2: gpe_sink_readygpe_sink_fail |
| 94 | func gpe_sink_scratch_commit(s:*GpeSink,n:i64)->i64 |
| 102 | func gpe_sink_js(s:*GpeSink,src:*u8,n:i64)->i64 |
| 124 | func gpe_sink_base64_size(n:i64)->i64 |
| 131 | func gpe_sink_base64(s:*GpeSink,src:*u8,n:i64)->i64 |
| 142 | func gpe_sink_release(s:*GpeSink)->i64 |
| 150 | func gpe_sink_destroy(s:*GpeSink)->i64 |