pub struct CompassAppConfig {
pub algorithm: SearchAlgorithmConfig,
pub state: Option<Vec<(String, StateVariableConfig)>>,
pub cost: CostModelConfig,
pub label: Value,
pub mapping: MapModelConfig,
pub graph: GraphConfig,
pub search: OneOrMany<SearchConfig>,
pub plugin: PluginConfig,
pub termination: TerminationModel,
pub system: CompassAppSystemParameters,
pub map_matching: Value,
}Expand description
high-level application configuration that orchestrates together
configuration requirements for the various components making up a
[CompassApp].
Fields§
§algorithm: SearchAlgorithmConfig§state: Option<Vec<(String, StateVariableConfig)>>§cost: CostModelConfig§label: Value§mapping: MapModelConfig§graph: GraphConfig§search: OneOrMany<SearchConfig>section containing a single search config or an array of search configs (OneOrMany).
plugin: PluginConfig§termination: TerminationModel§system: CompassAppSystemParameters§map_matching: ValueImplementations§
Source§impl CompassAppConfig
impl CompassAppConfig
Sourcepub fn from_str(
config: &str,
config_path: &str,
format: FileFormat,
) -> Result<CompassAppConfig, CompassAppError>
pub fn from_str( config: &str, config_path: &str, format: FileFormat, ) -> Result<CompassAppConfig, CompassAppError>
reads a stringified configuration file with provided format and constructs a CompassAppConfig
Source§impl CompassAppConfig
impl CompassAppConfig
Sourcepub fn to_pretty_string(&self) -> Result<String, CompassAppError>
pub fn to_pretty_string(&self) -> Result<String, CompassAppError>
Returns a pretty-printed JSON representation of this config. Useful for debugging and logging the exact configuration being used.
pub fn build_traversal_model_services( &self, builders: &CompassBuilderInventory, ) -> Result<Vec<Arc<dyn TraversalModelService>>, CompassAppError>
pub fn build_constraint_model_services( &self, builders: &CompassBuilderInventory, ) -> Result<Vec<Arc<dyn ConstraintModelService>>, CompassAppError>
Trait Implementations§
Source§impl Clone for CompassAppConfig
impl Clone for CompassAppConfig
Source§fn clone(&self) -> CompassAppConfig
fn clone(&self) -> CompassAppConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompassAppConfig
impl Debug for CompassAppConfig
Source§impl<'de> Deserialize<'de> for CompassAppConfig
impl<'de> Deserialize<'de> for CompassAppConfig
Source§fn 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
Source§impl Serialize for CompassAppConfig
impl Serialize for CompassAppConfig
Auto Trait Implementations§
impl Freeze for CompassAppConfig
impl RefUnwindSafe for CompassAppConfig
impl Send for CompassAppConfig
impl Sync for CompassAppConfig
impl Unpin for CompassAppConfig
impl UnsafeUnpin for CompassAppConfig
impl UnwindSafe for CompassAppConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more