pub struct GridPathQuery { /* private fields */ }Expand description
A reusable A* query object with pre-allocated scratch buffers.
Eliminates per-path heap allocations by reusing buffers across multiple pathfinding queries. Useful for high-throughput scenarios where many paths are computed per frame.
§Example
ⓘ
let mut query = GridPathQuery::new(&grid);
// First query
let path1 = query.find_path(&grid, GridPos::new(0, 0), GridPos::new(9, 9));
// Second query — reuses same buffers
let path2 = query.find_path(&grid, GridPos::new(1, 1), GridPos::new(8, 8));Implementations§
Auto Trait Implementations§
impl Freeze for GridPathQuery
impl RefUnwindSafe for GridPathQuery
impl Send for GridPathQuery
impl Sync for GridPathQuery
impl Unpin for GridPathQuery
impl UnsafeUnpin for GridPathQuery
impl UnwindSafe for GridPathQuery
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