Skip to main content

PreparedGridSearch

Trait PreparedGridSearch 

Source
pub trait PreparedGridSearch {
    // Required methods
    fn name(&self) -> &'static str;
    fn grid(&self) -> &Grid;
    fn metadata(&self) -> &PreprocessedGridMetadata;
    fn search(&self, request: SearchRequest) -> SearchResult;
}
Expand description

Prepared static grid that answers repeated point-to-point search requests.

Holds (or views) immutable walkability / cost data from preprocess. Query cost models follow the concrete algorithm named in metadata (for example A* on 4-way grids with per-cell traversal_cost).

Required Methods§

Source

fn name(&self) -> &'static str

Stable map identity (usually the builder name).

Source

fn grid(&self) -> &Grid

Grid snapshot used for walkability and costs.

Source

fn metadata(&self) -> &PreprocessedGridMetadata

Build-time summary of shape, walkability counts, and cost model labels.

Source

fn search(&self, request: SearchRequest) -> SearchResult

Point-to-point search on the prepared snapshot.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§