Struct spatial_table::SpatialTable
source · [−]pub struct SpatialTable<L: Layers> { /* private fields */ }
Implementations
sourceimpl<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> RefUnwindSafe for SpatialTable<L>where
L: RefUnwindSafe,
<L as Layers>::Layer: RefUnwindSafe,
impl<L> Send for SpatialTable<L>where
L: Send,
<L as Layers>::Layer: Send,
impl<L> Sync for SpatialTable<L>where
L: Sync,
<L as Layers>::Layer: Sync,
impl<L> Unpin for SpatialTable<L>where
L: Unpin,
<L as Layers>::Layer: Unpin,
impl<L> UnwindSafe for SpatialTable<L>where
L: UnwindSafe,
<L as Layers>::Layer: UnwindSafe,
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