1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use crate::{ configuration::{Configuration, ConfigurationInfo}, error::ConfigurationError, provider::Provider, }; impl Provider for Configuration { fn collect(&self) -> Result<Configuration, ConfigurationError> { Ok(self.clone()) } fn describe(&self) -> ConfigurationInfo { let formats: Vec<&str> = self .roots .iter() .map(|def| def.info.format.as_str()) .collect(); ConfigurationInfo::new( "other configuration".into(), format!("multiple({})", (&formats).join(",")), ) } }