pub fn try_get<C: Component>(&self, key: &str) -> Option<&C> {
        if let Some(e) = self.registry.get(&key.to_string()) {
            if let Some(r) = e.downcast_ref() {
                return Some(r);
            }
        }

        None
    }
/// Try to get an element from the registry.
Try to get an element from the registry.
Try to get an element from the registry .
pub fn try_get<C: Component>(&self, key: &str) -> Option<&C> {
        if let Some(e) = self.registry.get(&key.to_string()) {
            if let Some(r) = e.downcast_ref() {
                return Some(r);
            }
        }
        None
    }
pub fn try_get < C : Component > ( & self , key : & str ) -> Option < & C > { if let Some ( e ) = self . registry . get ( & key . to_string ( ) ) { if let Some ( r ) = e . downcast_ref ( ) { return Some ( r ) ; } } None }
Try to get an element from the registry.
Try to get an element from the registry .
&self
key
&str