pub struct Column { /* private fields */ }
Implementations
sourceimpl Column
impl Column
pub fn with_capacity(descriptor: &ComponentDescriptor, capacity: usize) -> Self
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub fn item_layout(&self) -> Layout
sourcepub unsafe fn initialize(
&mut self,
index: usize,
data: *mut u8,
ticks: ChangeTicks
)
pub unsafe fn initialize(
&mut self,
index: usize,
data: *mut u8,
ticks: ChangeTicks
)
Safety
- Data at
index
must already be allocated
sourcepub unsafe fn replace(&mut self, index: usize, data: *mut u8, change_tick: u32)
pub unsafe fn replace(&mut self, index: usize, data: *mut u8, change_tick: u32)
Safety
- Data at
index
must already be allocated
sourcepub unsafe fn replace_untracked(&mut self, index: usize, data: *mut u8)
pub unsafe fn replace_untracked(&mut self, index: usize, data: *mut u8)
Safety
- Data at
index
must already be allocated
sourcepub unsafe fn push(&mut self, data: *mut u8, change_ticks: ChangeTicks)
pub unsafe fn push(&mut self, data: *mut u8, change_ticks: ChangeTicks)
Safety
data
must point to valid data of column’s component type
sourcepub unsafe fn swap_remove_unchecked(&mut self, index: usize, component: *mut u8)
pub unsafe fn swap_remove_unchecked(&mut self, index: usize, component: *mut u8)
Safety
index
must be in boundsdata
must point to valid data of column’s component type
sourcepub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize)
pub unsafe fn swap_remove_and_drop_unchecked(&mut self, index: usize)
Safety
index
must be in bounds
pub fn get_data(&self, index: usize) -> Option<*mut u8>
sourcepub unsafe fn get_data_unchecked(&self, index: usize) -> *mut u8
pub unsafe fn get_data_unchecked(&self, index: usize) -> *mut u8
Safety
index
must be in bounds
pub fn get_ticks(&self, index: usize) -> Option<&UnsafeCell<ChangeTicks>>
sourcepub unsafe fn get_ticks_unchecked(
&self,
index: usize
) -> &UnsafeCell<ChangeTicks>
pub unsafe fn get_ticks_unchecked(
&self,
index: usize
) -> &UnsafeCell<ChangeTicks>
Safety
index
must be in bounds
pub fn clear(&mut self)
pub fn check_change_ticks(&mut self, change_tick: u32)
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more