Function resymgen::merge_symbols
source · pub fn merge_symbols<P, P2, I>(
symgen_file: P,
input_files: I,
input_format: InFormat,
merge_params: &LoadParams,
int_format: IntFormat
) -> Result<Vec<Vec<Symbol>>, Box<dyn Error>>where
P: AsRef<Path>,
P2: AsRef<Path>,
I: AsRef<[P2]>,
Expand description
Merges symbols from a collection of input_files
of the format input_format
into a given
symgen_file
.
Additional configuration is specified with merge_params
. Integers are written in int_format
.
Examples
ⓘ
let params = LoadParams {
default_block_name: None,
default_symbol_type: None,
default_version_name: Some("v1".into()),
};
merge_symbols(
"/path/to/symbols.yml",
["/path/to/input.csv"],
InFormat::Csv,
¶ms,
IntFormat::Hexadecimal,
)
.expect("failed to merge symbols");