unsafe fn put_component(&mut self, type_info: TypeInfo, src_ptr: *mut u8) -> Option<*mut u8> {
        match self.get_component_data_mut(type_info.id()) {
            Some(data) => data.replace(&type_info, NonNull::new(src_ptr).unwrap()),
            None => self.add_new_component(type_info, src_ptr),
        }
    }
// Moves a component into self, adding or replacing existing data
Moves a component into self, adding or replacing existing data
Moves a component into self adding or replacing existing data
unsafe fn put_component(&mut self, type_info: TypeInfo, src_ptr: *mut u8) -> Option<*mut u8> {
        match self.get_component_data_mut(type_info.id()) {
            Some(data) => data.replace(&type_info, NonNull::new(src_ptr).unwrap()),
            None => self.add_new_component(type_info, src_ptr),
        }
    }
unsafe fn put_component ( & mut self , type_info : TypeInfo , src_ptr : * mut u8 ) -> Option < * mut u8 > { match self . get_component_data_mut ( type_info . id ( ) ) { Some ( data ) => data . replace ( & type_info , NonNull :: new ( src_ptr ) . unwrap ( ) ) , None => self . add_new_component ( type_info , src_ptr ) , } }
Moves a component into self, adding or replacing existing data
Moves a component into self adding or replacing existing data
&mut self
type_info
TypeInfo
src_ptr
*mut u8
&mut self
type_info
TypeInfo
src_ptr
*mut u8