pub struct NavigationPath {
pub destination: usize,
pub success: bool,
pub steps: Vec<usize>,
}Expand description
Holds the result of an A-Star navigation query.
destination is the index of the target tile.
success is true if it reached the target, false otherwise.
steps is a vector of each step towards the target, including the starting position.
Fields§
§destination: usize§success: bool§steps: Vec<usize>Implementations§
Sourcepub fn new() -> NavigationPath
pub fn new() -> NavigationPath
Makes a new (empty) NavigationPath
Trait Implementations§
Source§fn clone(&self) -> NavigationPath
fn clone(&self) -> NavigationPath
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn default() -> NavigationPath
fn default() -> NavigationPath
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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