[−][src]Struct flat_spatial::storage::SparseStorage
SparseStorage stores cells in a HashMap to be used in a Grid. It is Sparse because cells are eagerly allocated, and cleaned when they are empty. It implements the Storage trait.
Implementations
impl<T: Default> SparseStorage<T>
[src]
Trait Implementations
impl<T: Default> Storage<T> for SparseStorage<T>
[src]
type Idx = (i32, i32)
type IdxIter = XYRange
fn new(cell_size: i32) -> Self
[src]
fn modify(&mut self, f: impl FnMut(&mut T) -> bool)
[src]
fn cell_mut<IC>(&mut self, pos: Point2<f32>, _: IC) -> (Self::Idx, &mut T) where
IC: FnMut(&mut Self),
[src]
IC: FnMut(&mut Self),
fn cell_mut_unchecked(&mut self, id: Self::Idx) -> &mut T
[src]
fn cell(&self, id: Self::Idx) -> Option<&T>
[src]
fn cell_range(&self, (x1, y1): Self::Idx, (x2, y2): Self::Idx) -> Self::IdxIter
[src]
fn cell_id(&self, pos: Point2<f32>) -> Self::Idx
[src]
fn cell_aabb(&self, id: Self::Idx) -> AABB
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for SparseStorage<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for SparseStorage<T> where
T: Send,
T: Send,
impl<T> Sync for SparseStorage<T> where
T: Sync,
T: Sync,
impl<T> Unpin for SparseStorage<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for SparseStorage<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,