pub trait AnyColumn: 'static {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
fn swap_remove(&mut self, row: usize) -> Box<dyn Any>;
fn push_boxed(&mut self, value: Box<dyn Any>);
}Expand description
A type-erased component column: one component type’s values in one archetype.
A value that moves between archetypes travels in a Box<dyn Any> holding
the component value itself, so moving a row never needs to know the
component type. Reads and writes do not go through this interface; they use
the concrete Column.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast support for a column reached exclusively.
Sourcefn swap_remove(&mut self, row: usize) -> Box<dyn Any>
fn swap_remove(&mut self, row: usize) -> Box<dyn Any>
Move the value at row out, filling the hole with the last value.
Sourcefn push_boxed(&mut self, value: Box<dyn Any>)
fn push_boxed(&mut self, value: Box<dyn Any>)
Append an already erased value of this column’s component type.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".