Skip to main content

report

Function report 

Source
pub fn report() -> Report
Available on crate feature diagnostics only.
Expand description

Run every detection check without short-circuiting and return the outcome of each one, plus the final container-detection result.

On non-Linux targets the returned report contains a single “platform” entry indicating that container detection is not supported.

Examples found in repository?
examples/report.rs (line 13)
12fn main() {
13    let report = detect_container::diagnostics::report();
14    println!("is_container() = {}", report.is_container);
15    println!();
16    println!("{:<32}  {:<7}  description", "check", "matched");
17    println!(
18        "{:<32}  {:<7}  {}",
19        "-".repeat(32),
20        "-------",
21        "-".repeat(40)
22    );
23    for c in &report.checks {
24        println!(
25            "{:<32}  {:<7}  {}",
26            c.name,
27            if c.matched { "yes" } else { "no" },
28            c.description
29        );
30    }
31}