melodium_loader/
loading_config.rs1use melodium_common::descriptor::Package;
2use std::path::PathBuf;
3use std::sync::Arc;
4
5#[derive(Debug, Default)]
12pub struct LoadingConfig {
13 pub core_packages: Vec<Arc<dyn Package>>,
15 pub search_locations: Vec<PathBuf>,
17 pub raw_elements: Vec<Arc<Vec<u8>>>,
18}
19
20impl LoadingConfig {
21 pub fn new() -> Self {
22 Self {
23 core_packages: Vec::new(),
24 search_locations: Vec::new(),
25 raw_elements: Vec::new(),
26 }
27 }
28
29 pub fn extend(&mut self, mut other: Self) {
30 self.core_packages.append(&mut other.core_packages);
31 self.search_locations.append(&mut other.search_locations);
32 self.raw_elements.append(&mut other.raw_elements);
33 }
34}