pub struct SpatialTable<L: Layers> { /* private fields */ }Implementations§
Source§impl<L: Layers> SpatialTable<L>
impl<L: Layers> SpatialTable<L>
pub fn new(size: Size) -> Self
pub fn clear(&mut self)
pub fn enumerate(&self) -> Enumerate<'_, L>
pub fn grid_size(&self) -> Size
pub fn layers_at(&self, coord: Coord) -> Option<&L>
pub fn layers_at_checked(&self, coord: Coord) -> &L
pub fn location_of(&self, entity: Entity) -> Option<&Location<L::Layer>>
pub fn coord_of(&self, entity: Entity) -> Option<Coord>
pub fn layer_of(&self, entity: Entity) -> Option<L::Layer>
pub fn update( &mut self, entity: Entity, location: Location<L::Layer>, ) -> Result<(), UpdateError>
pub fn update_coord( &mut self, entity: Entity, coord: Coord, ) -> Result<(), UpdateError>
pub fn update_layer( &mut self, entity: Entity, layer: L::Layer, ) -> Result<(), UpdateLayerError>
pub fn clear_layer(&mut self, entity: Entity) -> Result<(), EntityHasNoCoord>
pub fn remove(&mut self, entity: Entity)
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for SpatialTable<L>
impl<L> RefUnwindSafe for SpatialTable<L>
impl<L> Send for SpatialTable<L>
impl<L> Sync for SpatialTable<L>
impl<L> Unpin for SpatialTable<L>
impl<L> UnwindSafe for SpatialTable<L>
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