sim-lib-topology 0.1.3

Data-driven topology engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Topology engine error and validation-diagnostic constructors.

use sim_kernel::{Error, Symbol};

/// Builds a topology validation error naming the graph, context, and message.
pub fn validation_error(
    graph: &Symbol,
    context: impl AsRef<str>,
    message: impl AsRef<str>,
) -> Error {
    Error::Eval(format!(
        "topology validation error in {graph}: {}: {}",
        context.as_ref(),
        message.as_ref()
    ))
}