Skip to main content

PreprocessedGridBuilder

Trait PreprocessedGridBuilder 

Source
pub trait PreprocessedGridBuilder {
    type Map: PreparedGridSearch;

    // Required methods
    fn name(&self) -> &'static str;
    fn preprocess(
        &self,
        grid: &Grid,
    ) -> Result<Self::Map, PreprocessedGridBuildError>;
}
Expand description

Preprocesses a static grid into a queryable prepared map.

Prep may be a cheap clone (StaticPreparedGridBuilder) or an expensive index build. Failures are typed via PreprocessedGridBuildError.

Required Associated Types§

Source

type Map: PreparedGridSearch

Prepared map type this builder produces.

Required Methods§

Source

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

Stable builder identity for reports and portfolios.

Source

fn preprocess( &self, grid: &Grid, ) -> Result<Self::Map, PreprocessedGridBuildError>

Snapshot grid into a prepared search structure.

§Errors

Returns PreprocessedGridBuildError when the grid violates the algorithm’s cost or geometry assumptions.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§