pub struct Table<'a> { /* private fields */ }
Expand description
A wrapper class that gives direct access to the component arrays of a table, the table data
Implementations§
Source§impl<'a> Table<'a>
impl<'a> Table<'a>
Sourcepub fn new(world: impl WorldProvider<'a>, table: NonNull<ecs_table_t>) -> Self
pub fn new(world: impl WorldProvider<'a>, table: NonNull<ecs_table_t>) -> Self
Trait Implementations§
Source§impl IntoTable for Table<'_>
impl IntoTable for Table<'_>
fn table_ptr_mut(&self) -> *mut ecs_table_t
Source§impl IntoTableRange for Table<'_>
impl IntoTableRange for Table<'_>
fn range(&self) -> TableRange<'_>
fn range_raw(&self) -> ecs_table_range_t
Source§impl<'a> TableOperations<'a> for Table<'a>
impl<'a> TableOperations<'a> for Table<'a>
fn table(&self) -> Table<'a>
fn offset(&self) -> i32
fn world(&self) -> WorldRef<'a>
Source§fn find_type_index_id(&self, id: ecs_id_t) -> Option<i32>
fn find_type_index_id(&self, id: ecs_id_t) -> Option<i32>
Find type index for (component) id Read more
Source§fn find_type_index<T: ComponentId>(&self) -> Option<i32>
fn find_type_index<T: ComponentId>(&self) -> Option<i32>
Find type index for component type Read more
Source§fn find_type_index_pair_ids(
&self,
first: impl Into<Entity>,
second: impl Into<Entity>,
) -> Option<i32>
fn find_type_index_pair_ids( &self, first: impl Into<Entity>, second: impl Into<Entity>, ) -> Option<i32>
Find type index for pair of component types Read more
Source§fn find_type_index_pair<First: ComponentId, Second: ComponentId>(
&self,
) -> Option<i32>
fn find_type_index_pair<First: ComponentId, Second: ComponentId>( &self, ) -> Option<i32>
Find type index for pair of component types Read more
Source§fn find_type_index_second_id<First: ComponentId>(
&self,
second: impl Into<Entity>,
) -> Option<i32>
fn find_type_index_second_id<First: ComponentId>( &self, second: impl Into<Entity>, ) -> Option<i32>
Find type index for pair of component types Read more
Source§fn find_column_index_id(&self, id: ecs_id_t) -> Option<i32>
fn find_column_index_id(&self, id: ecs_id_t) -> Option<i32>
Find index for (component) id in table type Read more
Source§fn find_column_index<T: ComponentId>(&self) -> Option<i32>
fn find_column_index<T: ComponentId>(&self) -> Option<i32>
Find column index for component type in table Read more
Source§fn find_column_index_pair<First: ComponentId, Second: ComponentId>(
&self,
) -> Option<i32>
fn find_column_index_pair<First: ComponentId, Second: ComponentId>( &self, ) -> Option<i32>
Find index for pair of component types in table Read more
Source§fn find_column_index_pair_ids(
&self,
first: impl Into<Entity>,
second: impl Into<Entity>,
) -> Option<i32>
fn find_column_index_pair_ids( &self, first: impl Into<Entity>, second: impl Into<Entity>, ) -> Option<i32>
Find index for pair of component ids in table type Read more
Source§fn find_column_index_second_id<First: ComponentId>(
&self,
second: impl Into<Entity>,
) -> Option<i32>
fn find_column_index_second_id<First: ComponentId>( &self, second: impl Into<Entity>, ) -> Option<i32>
Find index for pair of component types in table type Read more
Source§fn has_pair<First: ComponentId, Second: ComponentId>(&self) -> bool
fn has_pair<First: ComponentId, Second: ComponentId>(&self) -> bool
Test if table has pair of component types Read more
Source§fn has_pair_ids(
&self,
first: impl Into<Entity>,
second: impl Into<Entity>,
) -> bool
fn has_pair_ids( &self, first: impl Into<Entity>, second: impl Into<Entity>, ) -> bool
Test if table has pair of component ids Read more
Source§fn column_untyped(&self, index: i32) -> Option<*mut c_void>
fn column_untyped(&self, index: i32) -> Option<*mut c_void>
Get column, components array ptr from table by column index. Read more
Source§fn get_mut<T: ComponentId>(&self) -> Option<&mut [T]>
fn get_mut<T: ComponentId>(&self) -> Option<&mut [T]>
Get column, components array ptr from table by component type. Read more
Source§fn get_mut_untyped(&self, id: ecs_id_t) -> Option<*mut c_void>
fn get_mut_untyped(&self, id: ecs_id_t) -> Option<*mut c_void>
Get column, components array ptr from table by component type. Read more
Source§fn get_pair_ids_mut_untyped(
&self,
first: impl Into<Entity>,
second: impl Into<Entity>,
) -> Option<*mut c_void>
fn get_pair_ids_mut_untyped( &self, first: impl Into<Entity>, second: impl Into<Entity>, ) -> Option<*mut c_void>
Get column, components array ptr from table by pair ids. Read more
Source§fn get_pair_mut_untyped<First: ComponentId, Second: ComponentId>(
&self,
) -> Option<*mut c_void>
fn get_pair_mut_untyped<First: ComponentId, Second: ComponentId>( &self, ) -> Option<*mut c_void>
Get column, components array ptr from table by pair of component types. Read more
Source§fn column_size(&self, index: i32) -> usize
fn column_size(&self, index: i32) -> usize
Get column size from table at the provided column index. Read more
impl<'a> Copy for Table<'a>
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> !Send for Table<'a>
impl<'a> !Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more