Skip to main content

convert_input

Function convert_input 

Source
pub fn convert_input(file: &mut PolydatFile, name: &str) -> Result<(), String>
Expand description

Let the program’s extern name take a value of any type, converted in front of each reader by a converter node (input_variance.md §6).

The extern is declared dyn; the compiler places one converter per type its readers read, reports each in the compile log, and a value the converter cannot convert fails the converter, attributed as any node’s failure. For one input a host knows varies, without opening every input the author left untyped. A name that is not a top-level extern is an error: a coordinate is positioned with set_inputs and never varies in type.