Trait Map

Source
pub trait Map: Send + Sync {
    // Required methods
    fn new() -> MapType
       where Self: Sized;
    fn load(&mut self, points: Vec<Vec<i32>>) -> RetResult<()>;
    fn load_from_file<'life0, 'async_trait>(
        &'life0 mut self,
        file_name: String,
    ) -> Pin<Box<dyn Future<Output = RetResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_from_string<'life0, 'async_trait>(
        &'life0 mut self,
        file_contend: String,
    ) -> Pin<Box<dyn Future<Output = RetResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_path(
        &self,
        start: (IndexType, IndexType),
        end: (IndexType, IndexType),
    ) -> Vec<(IndexType, IndexType)>;
    fn set_walkable(&mut self, point: (IndexType, IndexType), walkable: i32);
    fn in_map(&self, x: i32, y: i32) -> bool;
}

Required Methods§

Source

fn new() -> MapType
where Self: Sized,

Source

fn load(&mut self, points: Vec<Vec<i32>>) -> RetResult<()>

Source

fn load_from_file<'life0, 'async_trait>( &'life0 mut self, file_name: String, ) -> Pin<Box<dyn Future<Output = RetResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn load_from_string<'life0, 'async_trait>( &'life0 mut self, file_contend: String, ) -> Pin<Box<dyn Future<Output = RetResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn find_path( &self, start: (IndexType, IndexType), end: (IndexType, IndexType), ) -> Vec<(IndexType, IndexType)>

Source

fn set_walkable(&mut self, point: (IndexType, IndexType), walkable: i32)

Source

fn in_map(&self, x: i32, y: i32) -> bool

Implementors§