pub trait GeoApplyTarget {
// Required methods
fn bus_row(&self, key: &ElementKey) -> Option<usize>;
fn branch_row(&self, feature: &GeoFeature) -> Option<usize>;
fn place_bus(
&mut self,
row: usize,
point: [f64; 2],
kind: Option<CoordsKind>,
);
fn place_branch(
&mut self,
row: usize,
path: &[[f64; 2]],
kind: Option<CoordsKind>,
);
fn substation_note(&self, count: usize) -> String;
fn unlocated_counts(&self) -> (usize, usize);
}Expand description
The model half of one apply_geo_features pass: how a feature key
resolves to a row, and how a matched point or route lands on the model.
Required Methods§
fn bus_row(&self, key: &ElementKey) -> Option<usize>
fn branch_row(&self, feature: &GeoFeature) -> Option<usize>
fn place_bus(&mut self, row: usize, point: [f64; 2], kind: Option<CoordsKind>)
fn place_branch( &mut self, row: usize, path: &[[f64; 2]], kind: Option<CoordsKind>, )
Sourcefn substation_note(&self, count: usize) -> String
fn substation_note(&self, count: usize) -> String
Report note for substation features this target cannot place.
Sourcefn unlocated_counts(&self) -> (usize, usize)
fn unlocated_counts(&self) -> (usize, usize)
Elements the model still has no geometry for, as (buses with no location, branches with no route).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".