/// Create a custom FIDL library source file containing all the fields of a config declaration
Create a custom FIDL library source file containing all the fields of a config declaration
Create a custom FIDL library source file containing all the fields of a config declaration
pub fn create_fidl_source(config_decl: &ConfigDecl, library_name: String) -> String {
    let fidl_library = FidlLibrary::new(config_decl, library_name);
    let mut hbars = Handlebars::new();
    hbars.set_strict_mode(true);
    hbars.register_escape_fn(handlebars::no_escape);
    hbars
        .register_template_string("fidl_library", FIDL_CLIENT_TEMPLATE)
        .expect("known good template should parse");
    hbars.render("fidl_library", &fidl_library).unwrap()
}
pub fn create_fidl_source ( config_decl : & ConfigDecl , library_name : String ) -> String { let fidl_library = FidlLibrary :: new ( config_decl , library_name ) ; let mut hbars = Handlebars :: new ( ) ; hbars . set_strict_mode ( true ) ; hbars . register_escape_fn ( handlebars :: no_escape ) ; hbars . register_template_string ( " " , FIDL_CLIENT_TEMPLATE ) . expect ( " " ) ; hbars . render ( " " , & fidl_library ) . unwrap ( ) }
Create a custom FIDL library source file containing all the fields of a config declaration
Create a custom FIDL library source file containing all the fields of a config declaration
config_decl
&ConfigDecl
library_name
String