pub unsafe fn register_component_raw(
        &mut self,
        type_id: ComponentTypeId,
        f: fn() -> Box<dyn UnknownComponentStorage>,
    ) {
        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(f);
    }
/// Adds a new component to the layout.
///
/// # Safety
/// The storage returned from the storage constructor function must be capable
/// of storing the component type identified by `type_id`.
Adds a new component to the layout.
Adds a new component to the layout .
pub unsafe fn register_component_raw(
        &mut self,
        type_id: ComponentTypeId,
        f: fn() -> Box<dyn UnknownComponentStorage>,
    ) {
        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(f);
    }
pub unsafe fn register_component_raw ( & mut self , type_id : ComponentTypeId , f : fn ( ) -> Box < dyn UnknownComponentStorage > , ) { assert ! ( self components contains ( type_id ) " " ) ; self . components . push ( type_id ) ; self . component_constructors . push ( f ) ; }
Adds a new component to the layout.
Adds a new component to the layout .
&mut self
type_id
ComponentTypeId
f
fn() -> Box<dyn UnknownComponentStorage>
&mut self
type_id
ComponentTypeId
f
fn() -> Box<dyn UnknownComponentStorage>
safety
The storage returned from the storage constructor function must be capable
of storing the component type identified by `type_id`.
The storage returned from the storage constructor function must be capable of storing the component type identified by ` type_id ` .