pub mod espeak; pub mod light_beewi_bbl227; pub mod stdout; use crate::output::*; use std::collections::HashMap; pub fn factory( name: &str, config: &HashMap, ) -> Result, Box> { match name { "stdout" => Ok(Box::new(stdout::Stdout::new(&config)?)), "espeak" => Ok(Box::new(espeak::Espeak::new(&config)?)), "light_beewi_bbl227" => Ok(Box::new(light_beewi_bbl227::BluetoothLightbulb::new( &config, )?)), _ => panic!("Unknown monitor name: {}", name), } }