computeblock

Macro computeblock 

Source
computeblock!() { /* proc-macro */ }
Expand description

Macro for defining a ComputeBlock with mandatory test coverage.

A ComputeBlock is a self-contained unit of functionality that:

  1. Has a defined interface (via tests)
  2. Has documented behavior (via tests)
  3. Cannot exist without tests

§Example

// Define the block - this REQUIRES tests to exist
computeblock! {
    name: CpuPanel,
    interface: [
        per_core_freq: Vec<u64>,
        per_core_temp: Vec<f32>,
    ],
    tests: "tests/cpu_panel_interface.rs"
}