pub struct CuConfig {
pub monitor: Option<MonitorConfig>,
pub logging: Option<LoggingConfig>,
pub runtime: Option<RuntimeConfig>,
pub graphs: ConfigGraphs,
}Expand description
CuConfig is the programmatic representation of the configuration graph. It is a directed graph where nodes are tasks and edges are connections between tasks.
The core of CuConfig is its graphs field which can be either a simple graph
or a collection of mission-specific graphs. The graph structure is based on petgraph.
Fields§
§monitor: Option<MonitorConfig>Optional monitoring configuration
logging: Option<LoggingConfig>Optional logging configuration
runtime: Option<RuntimeConfig>Optional runtime configuration
graphs: ConfigGraphsGraph structure - either a single graph or multiple mission-specific graphs
Implementations§
Source§impl CuConfig
The implementation has a lot of convenience methods to manipulate
the configuration to give some flexibility into programmatically creating the configuration.
impl CuConfig
The implementation has a lot of convenience methods to manipulate the configuration to give some flexibility into programmatically creating the configuration.
pub fn new_simple_type() -> CuConfig
pub fn new_mission_type() -> CuConfig
pub fn serialize_ron(&self) -> String
pub fn deserialize_ron(ron: &str) -> CuConfig
Sourcepub fn render(
&self,
output: &mut dyn Write,
mission_id: Option<&str>,
) -> Result<(), CuError>
pub fn render( &self, output: &mut dyn Write, mission_id: Option<&str>, ) -> Result<(), CuError>
Render the configuration graph in the dot format.
pub fn get_all_instances_configs( &self, mission_id: Option<&str>, ) -> Vec<Option<&ComponentConfig>>
pub fn get_graph(&self, mission_id: Option<&str>) -> Result<&CuGraph, CuError>
pub fn get_graph_mut( &mut self, mission_id: Option<&str>, ) -> Result<&mut CuGraph, CuError>
pub fn get_monitor_config(&self) -> Option<&MonitorConfig>
pub fn get_runtime_config(&self) -> Option<&RuntimeConfig>
Sourcepub fn validate_logging_config(&self) -> Result<(), CuError>
pub fn validate_logging_config(&self) -> Result<(), CuError>
Validate the logging configuration to ensure section pre-allocation sizes do not exceed slab sizes. This method is wrapper around LoggingConfig::validate
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CuConfig
impl<'de> Deserialize<'de> for CuConfig
Source§fn deserialize<D>(
deserializer: D,
) -> Result<CuConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<CuConfig, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
This is a custom serialization to make this implementation independent of petgraph.
Source§impl Serialize for CuConfig
impl Serialize for CuConfig
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
This is a custom serialization to make this implementation independent of petgraph.
Auto Trait Implementations§
impl Freeze for CuConfig
impl RefUnwindSafe for CuConfig
impl Send for CuConfig
impl Sync for CuConfig
impl Unpin for CuConfig
impl UnwindSafe for CuConfig
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
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>
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>
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