pub struct AStar<'a> { /* private fields */ }Implementations§
Source§impl<'a> AStar<'a>
impl<'a> AStar<'a>
pub fn new_from_callback<T: 'a + FnMut((i32, i32), (i32, i32)) -> f32>( width: i32, height: i32, path_callback: T, diagonal_cost: f32, ) -> AStar<'a>
pub fn new_from_map(map: Map, diagonal_cost: f32) -> AStar<'static>
pub fn find(&mut self, from: (i32, i32), to: (i32, i32)) -> bool
pub fn iter(&'a self) -> AStarPathIter<'a> ⓘ
pub fn walk(&mut self) -> AStarIterator ⓘ
pub fn walk_recalculate(&mut self) -> AStarIterator ⓘ
pub fn walk_one_step( &mut self, recalculate_when_needed: bool, ) -> Option<(i32, i32)>
pub fn reverse(&mut self)
pub fn origin(&self) -> (isize, isize)
pub fn destination(&self) -> (isize, isize)
pub fn get(&self, index: i32) -> Option<(i32, i32)>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> i32
Trait Implementations§
Source§impl<'a> AsNative<*mut c_void> for AStar<'a>
impl<'a> AsNative<*mut c_void> for AStar<'a>
unsafe fn as_native(&self) -> &TCOD_path_t
unsafe fn as_native_mut(&mut self) -> &mut TCOD_path_t
Auto Trait Implementations§
impl<'a> Freeze for AStar<'a>
impl<'a> !RefUnwindSafe for AStar<'a>
impl<'a> !Send for AStar<'a>
impl<'a> !Sync for AStar<'a>
impl<'a> Unpin for AStar<'a>
impl<'a> !UnwindSafe for AStar<'a>
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