pub fn register_component<T: Component>(&mut self) {
        let type_id = ComponentTypeId::of::<T>();
        assert!(
            !self.components.contains(&type_id),
            "only one component of a given type may be attached to a single entity"
        );
        self.components.push(type_id);
        self.component_constructors
            .push(|| Box::new(T::Storage::default()));
    }
/// Adds a new component to the layout.
Adds a new component to the layout.
Adds a new component to the layout .
pub fn register_component<T: Component>(&mut self) {
        let type_id = ComponentTypeId::of::<T>();
        assert!(
            !self.components.contains(&type_id),
            "only one component of a given type may be attached to a single entity"
        );
        self.components.push(type_id);
        self.component_constructors
            .push(|| Box::new(T::Storage::default()));
    }
pub fn register_component < T : Component > ( & mut self ) { let type_id = ComponentTypeId :: of :: < T > ( ) ; assert ! ( self components contains ( type_id ) " " ) ; self . components . push ( type_id ) ; self . component_constructors . push ( | | Box :: new ( T :: Storage :: default ( ) ) ) ; }
Adds a new component to the layout.
Adds a new component to the layout .
&mut self
&mut self