pub struct Config {
pub map_file: PathBuf,
pub vehicles: Config,
pub nodes: Config,
pub edges: Config,
pub generating: Option<Config>,
}
Expand description
Set config-values with yaml-file (TODO update this text)
You can change the configuration with an input-file (*.yaml
).
With this yaml
-config, the parser can be adjusted to parse (edge-)metrics in the order as provided by the config-file.
This can help especially with map-files in fmi
-format, since the metrics are read sequentially.
But since pbf
-files does not provide a column-based metric-list, but intrinsically by parsing osm
-data, you can distinguish between default-metrics and custom-metrics via the key category
.
Default-categories are described in EdgeCategory
.
Internally, a default-metric uses provided calculation-rules to be calculated by other default-categories as well (like the duration from distance and maxspeed).
Keep in mind, that metrics (except for id) are stored as f64
for better maintainability and efficiency.
Fields
map_file: PathBuf
vehicles: Config
nodes: Config
edges: Config
generating: Option<Config>
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl SupportingFileExts for Config
impl SupportingFileExts for Config
fn supported_exts<'a>() -> &'a [&'a str]
fn ext_from<P: AsRef<Path> + ?Sized>(path: &P) -> Result<&str>
fn find_supported_ext<'a, P: AsRef<Path> + ?Sized>(path: &P) -> Result<&'a str>
fn check_ext_support<P: AsRef<Path> + ?Sized>(path: &P) -> Feedback
fn is_file_supported<P: AsRef<Path> + ?Sized>(path: &P) -> bool
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.