Trait cwe_checker_lib::utils::debug::ToJsonCompact
source · pub trait ToJsonCompact {
// Required method
fn to_json_compact(&self) -> Value;
// Provided method
fn print_compact_json(&self) { ... }
}
Expand description
Central utility for debug printing in the cwe_checker
.
The canonical way to do printf-debugging in cwe_checker
development is to
implement this trait for the type you want to inspect and then print it
via value.print_compact_json()
.
Required Methods§
sourcefn to_json_compact(&self) -> Value
fn to_json_compact(&self) -> Value
Returns a json representation of values of type self
that is
suitable for debugging purposes.
The idea is that printing of complex types is facilitated by
implementing to_json_compact
for all of their constituent parts.
Provided Methods§
sourcefn print_compact_json(&self)
fn print_compact_json(&self)
Print values of type Self
for debugging purposes.