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 async 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 async fn set_walkable( &self, map_id: &i64, point: (IndexType, IndexType), walkable: i32, ) -> RetResult<()>
pub async 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 !UnwindSafe for MapManager
impl Freeze for MapManager
impl Send for MapManager
impl Sync for MapManager
impl Unpin for MapManager
impl UnsafeUnpin 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