Skip to main content

nested_list_setter_method

Function nested_list_setter_method 

Source
pub(crate) fn nested_list_setter_method(inner: &str) -> Option<&str>
Expand description

Return the TypeScript setter method name for a List(List(<inner>)) field, given the doubly-nested (innermost) element type name — e.g. "Float32" for the embeddings: List(List(Float32)) shape used by inference.capnp/model.capnp.

Mirrors list_setter_method one level deeper: the runtime encodes the outer list as a plain pointer list (each element itself a List(<inner>) pointer), so only inner element types the flat list runtime already supports as a primitive list are covered here — None for Text/Data (nested List(List(Text))/List(List(Data))) and struct/list inner types, which are not yet implemented and must remain a hard generator error rather than silently degrading (#758).