Struct pathfinding::map::MapManager
source · pub struct MapManager { /* private fields */ }Implementations§
source§impl MapManager
impl MapManager
pub fn get_instance() -> Arc<RwLock<MapManager>>
pub async fn new_astar(&mut self) -> i64
pub async fn remove_map(&mut self, map_id: &i64)
pub fn load(&self, map_id: &i64, points: Vec<Vec<i32>>) -> RetResult<()>
pub async fn load_from_file(&self, map_id: &i64, file: String) -> RetResult<()>
pub async fn load_from_string( &self, map_id: &i64, file: String ) -> RetResult<()>
pub fn set_walkable( &self, map_id: &i64, point: (IndexType, IndexType), walkable: i32 ) -> RetResult<()>
pub fn find_path( &self, map_id: &i64, start: (IndexType, IndexType), end: (IndexType, IndexType) ) -> RetResult<Vec<(IndexType, IndexType)>>
Auto Trait Implementations§
impl RefUnwindSafe for MapManager
impl Send for MapManager
impl Sync for MapManager
impl Unpin for MapManager
impl UnwindSafe for MapManager
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