pub struct ConfigReport { /* private fields */ }Expand description
The outcome of reading one cfg file.
Implementations§
Source§impl ConfigReport
impl ConfigReport
Sourcepub fn parse(&self) -> &ConfigParse
pub fn parse(&self) -> &ConfigParse
The parse result.
Sourcepub fn config(&self) -> Option<&ModelConfig>
pub fn config(&self) -> Option<&ModelConfig>
The configuration, if accepted.
Sourcepub fn render_human(&self) -> String
pub fn render_human(&self) -> String
Diagnostics, one per line, like file:3:7: error[DIVE-C0013]: message,
with TLC’s equivalent report after each error.
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The report as JSON (the config object of dive parse --output json).
{ "file", "accepted",
"diagnostics": [ { "code", "severity", "message", "help", "span",
"tlc": { "code", "name", "exit_code", "line", "detail" } | null } ],
"model": { "init", "next", "specification", "view", "symmetry", "alias",
"periodic", "rl_reward", // name objects or null
"check_deadlock": bool | null, "checks_deadlock": bool,
"invariants", "properties", "constraints", "action_constraints",
"postconditions", "possible", // arrays of name objects
"constants": [ { "kind": "assignment", "name", "module", "args", "value" }
| { "kind": "substitution", "name", "module", "target" } ],
"model_values": [ "..." ] } | null }A name object is { "text", "span" }; a value is { "int" },
{ "string" }, { "bool" }, { "model_value" } or { "set": [...] },
each with a span.
This is a nested configuration fragment. Its wire contract inherits
the enclosing parse or check report’s version; it is not an
independently versioned operation envelope.
Trait Implementations§
Source§impl Clone for ConfigReport
impl Clone for ConfigReport
Auto Trait Implementations§
impl Forget for ConfigReport
impl Freeze for ConfigReport
impl Move for ConfigReport
impl RefUnwindSafe for ConfigReport
impl Send for ConfigReport
impl Sync for ConfigReport
impl Unpin for ConfigReport
impl UnsafeUnpin for ConfigReport
impl UnwindSafe for ConfigReport
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