1use crate::module::Module;
2use crate::*;
3
4pub fn generate_profiles(paths: &DirPaths, root_module: &mut Module) -> Result<(), Box<dyn Error>> {
7 let profiles_module = root_module
10 .children
11 .get_mut("profiles")
12 .expect("Couldn't find the profiles module in root?");
13
14 profiles_module.scope.writeln("//* OCSF Profiles");
15 profiles_module.scope.add_generation_timestamp_comment();
16
17 write_source_file(
18 &format!("{}src/profiles.rs", paths.destination_path),
19 &profiles_module.scope.to_string(),
20 )
21}