pub struct Grid { /* private fields */ }Implementations§
Source§impl Grid
impl Grid
pub fn new(width: u32, height: u32) -> Result<Grid, NavigationError>
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn set_blocked( &mut self, cell: Cell, blocked: bool, ) -> Result<(), NavigationError>
pub fn set_cost(&mut self, cell: Cell, cost: u16) -> Result<(), NavigationError>
pub fn walkable(&self, cell: Cell) -> bool
pub fn path( &self, start: Cell, end: Cell, connectivity: Connectivity, ) -> Result<Vec<Cell>, NavigationError>
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnwindSafe for Grid
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