var searchIndex = {}; searchIndex["codespawn"] = {"doc":"[Codespawn](https://github.com/kondrak/codespawn) is a basic C++ and Rust code generator.\n Desired API can be defined using either JSON or XML and the crate supports both reading\n from a file or a string.","items":[[5,"from_xml","codespawn","Reads XML data from file and compiles it into `RawCode`",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"from_xml_str","","Reads XML data from a `&str` and compiles it into `RawCode`",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"from_json","","Reads JSON data from file and compiles it into `RawCode`",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[5,"from_json_str","","Reads JSON data from a `&str` and compiles it into `RawCode`",null,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[0,"raw_code","","Structures and generators for abstract code data.",null,null],[3,"CodeItem","codespawn::raw_code","Representation of a single code element.",null,null],[12,"name","","Name of the element.",0,null],[12,"attributes","","List of element's attributes and properties.",0,null],[12,"children","","List of child elements.",0,null],[3,"CodeConfig","","Language-specific configuration map.",null,null],[12,"name","","Name of the configuration (can be `cpp` or `rust`).",1,null],[12,"type_dict","","Maps abstract type to overriden, language-specific type. Can be empty if no overrides are specified in config.",1,null],[12,"name_dict","","Maps abstract name to overriden, language-specific name (variables, functions, attributes etc.). Can be empty if no overrides are specified in config.",1,null],[12,"global_cfg","","List of global configuration data for given language.",1,null],[3,"RawCode","","Abstract code data representation.\nObject of this type can be used to generate desired code.",null,null],[12,"configs","","Map of language-specific configurations.",2,null],[12,"elements","","A vector of all code elements.",2,null],[11,"clone","","",0,null],[11,"to_cpp","","Converts `RawCode` into C++ `FormattedCode`",2,null],[11,"to_rust","","Converts `RawCode` into Rust `FormattedCode`",2,null],[11,"fmt","","",2,null],[11,"fmt","","",1,null],[0,"fmt_code","codespawn","Structures and formatters for language-specific code data.",null,null],[3,"FormattedCode","codespawn::fmt_code","Formatted code data representation.\nObject of this type is already pre-parsed and ready to generate code for the specific\nlanguage it's been formatted to.",null,null],[12,"language","","Language name.",3,null],[12,"elements","","List of code elements, formatted for current language.",3,null],[12,"num_tabs","","Number of tab characters per line (default: 4).",3,null],[12,"tab_char","","Tab character to be used (default: space).",3,null],[4,"Lang","","Supported languages.",null,null],[13,"Cpp","","",4,null],[13,"Rust","","",4,null],[11,"hash","","",4,null],[11,"eq","","",4,null],[11,"to_file","","Saves generated code to file.",3,null],[11,"to_string","","Generates code and returns it as a `String`",3,null],[11,"fmt","","",4,null],[11,"fmt","","",3,null]],"paths":[[3,"CodeItem"],[3,"CodeConfig"],[3,"RawCode"],[3,"FormattedCode"],[4,"Lang"]]}; initSearch(searchIndex);