pub fn create(&mut self, value: T) -> Pointer<T> {
        let data = match self.inner.free_list.pop() {
            Some(data) => {
                let i = data.get_index();
                debug_assert_eq!(self.inner.meta[i], 0);
                self.inner.data[i] = value;
                self.inner.meta[i] = 1;
                data
            }
            None => {
                let i = self.inner.meta.len();
                debug_assert_eq!(self.inner.data.len(), i);
                self.inner.data.push(value);
                self.inner.meta.push(1);
                PointerData::new(i, 0, self.id)
            }
        };
        Pointer {
            data,
            pending: self.pending.clone(),
            marker: PhantomData,
        }
    }
/// Add a new component to the storage, returning the `Pointer` to it.
Add a new component to the storage, returning the `Pointer` to it.
Add a new component to the storage returning the ` Pointer ` to it .
pub fn create(&mut self, value: T) -> Pointer<T> {
        let data = match self.inner.free_list.pop() {
            Some(data) => {
                let i = data.get_index();
                debug_assert_eq!(self.inner.meta[i], 0);
                self.inner.data[i] = value;
                self.inner.meta[i] = 1;
                data
            }
            None => {
                let i = self.inner.meta.len();
                debug_assert_eq!(self.inner.data.len(), i);
                self.inner.data.push(value);
                self.inner.meta.push(1);
                PointerData::new(i, 0, self.id)
            }
        };
        Pointer {
            data,
            pending: self.pending.clone(),
            marker: PhantomData,
        }
    }
pub fn create ( & mut self , value : T ) -> Pointer < T > { let data = match self . inner . free_list . pop ( ) { Some ( data ) => { let i = data . get_index ( ) ; debug_assert_eq ! ( self inner meta [ i ] 0 ) ; self . inner . data [ i ] = value ; self . inner . meta [ i ] = 1 ; data } None => { let i = self . inner . meta . len ( ) ; debug_assert_eq ! ( self inner data len ( ) i ) ; self . inner . data . push ( value ) ; self . inner . meta . push ( 1 ) ; PointerData :: new ( i , 0 , self . id ) } } ; Pointer { data , pending : self . pending . clone ( ) , marker : PhantomData , } }
Add a new component to the storage, returning the `Pointer` to it.
Add a new component to the storage returning the ` Pointer ` to it .
&mut self
value
T