1pub use std::sync::Arc; 2 3pub trait HasComponent<C> { 4 5 fn put(&mut self, name: &str, component: Arc<C>) -> &mut Self; 6 7 fn get(&self, name: &str) -> Option<Arc<C>>; 8 9 fn get_all(&self) -> Vec<(&str, Arc<C>)>; 10}