use super::*; mod usage; use usage::Usage; mod device; use device::Device; mod internal; use internal::Internal; pub struct InputManager { channel:Sender, } impl InputManager { } impl Subsystem for InputManager { fn start(supervisor:Option>) -> Result, Error> { if let Some(supervisor) = supervisor { let (tx, rx) = channel::bounded::(24); let sys_tx = tx.clone(); std::thread::spawn(move || { Internal::thread(supervisor, sys_tx, rx); }); Ok(tx) } else { Err(Error::new()) } } } impl From> for InputManager { fn from(channel:Sender) -> Self { Self { channel } } }