Struct codespawn::raw_code::RawCode
[−]
[src]
pub struct RawCode { pub configs: HashMap<String, CodeConfig>, pub elements: Vec<CodeItem>, // some fields omitted }
Abstract code data representation. Object of this type can be used to generate desired code.
Fields
configs: HashMap<String, CodeConfig>
Map of language-specific configurations.
elements: Vec<CodeItem>
A vector of all code elements.
Methods
impl RawCode
[src]
fn to_cpp(&self) -> Result<FormattedCode>
Converts RawCode
into C++ FormattedCode
Examples
extern crate codespawn; let raw_code = codespawn::from_xml("examples/sample.xml").unwrap(); let cpp_code = raw_code.to_cpp();
fn to_rust(&self) -> Result<FormattedCode>
Converts RawCode
into Rust FormattedCode
Examples
extern crate codespawn; let raw_code = codespawn::from_xml("examples/sample.xml").unwrap(); let cpp_code = raw_code.to_rust();