Lines Matching refs:unit
13 use crate::unit::Unit;
14 use crate::unit::UnitState;
111 for unit in units { in list_unit()
112 res = format!("{}\n{}", res, unit.lock().unwrap().unit_base().unit_info()); in list_unit()
126 Some(unit) => { in stop()
127 unit.lock().unwrap().exit(); in stop()
142 Some(unit) => unit.lock().unwrap().run()?, in start()
145 let unit = UnitManager::get_unit_with_id(&i).unwrap(); in start() localVariable
146 let mut unit = unit.lock().unwrap(); in start() localVariable
147 unit.run()?; in start()
166 Some(unit) => { in restart()
167 let mut unit = unit.lock().unwrap(); in restart() localVariable
168 if is_try && *unit.unit_base().state() == UnitState::Active { in restart()
169 unit.restart()?; in restart()
171 unit.restart()?; in restart()
176 let unit = UnitManager::get_unit_with_id(&i).unwrap(); in restart() localVariable
177 unit.lock().unwrap().run()?; in restart()
203 for unit in bindings { in filter_units()
204 units.push(unit.clone()); in filter_units()