wasm4pm 26.6.12

High-performance process mining algorithms in WebAssembly for JavaScript/TypeScript
Documentation
// Auto-generated by CodeManufactory from wasm4pm ontology
// DO NOT EDIT — regenerate via: ostar manufacture wasm4pm

use serde::{Deserialize, Serialize};
use std::fmt;

/// Proof gates from wasm4pm-manufacturing.nt.
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ProofGate {
    gate_benchmark_complete,
    gate_cargo_clippy_clean,
    gate_compilation_passes,
    gate_docs_complete,
    gate_projection_complete,
    gate_schema_valid,
    gate_test_suite_passes,
    gate_wasm_compiles,
}

impl ProofGate {
    pub fn id(&self) -> &'static str {
        match self {
            Self::gate_benchmark_complete => "gate-benchmark-complete",
            Self::gate_cargo_clippy_clean => "gate-cargo-clippy-clean",
            Self::gate_compilation_passes => "gate-compilation-passes",
            Self::gate_docs_complete => "gate-docs-complete",
            Self::gate_projection_complete => "gate-projection-complete",
            Self::gate_schema_valid => "gate-schema-valid",
            Self::gate_test_suite_passes => "gate-test-suite-passes",
            Self::gate_wasm_compiles => "gate-wasm-compiles",
        }
    }

    pub fn label(&self) -> &'static str {
        match self {
            Self::gate_benchmark_complete => "benchmark-complete",
            Self::gate_cargo_clippy_clean => "cargo-clippy-clean",
            Self::gate_compilation_passes => "compilation-passes",
            Self::gate_docs_complete => "docs-complete",
            Self::gate_projection_complete => "projection-complete",
            Self::gate_schema_valid => "schema-valid",
            Self::gate_test_suite_passes => "test-suite-passes",
            Self::gate_wasm_compiles => "wasm-compiles",
        }
    }

    pub fn pipeline_order() -> &'static [Self] {
        &[
            Self::gate_benchmark_complete,
            Self::gate_cargo_clippy_clean,
            Self::gate_compilation_passes,
            Self::gate_docs_complete,
            Self::gate_projection_complete,
            Self::gate_schema_valid,
            Self::gate_test_suite_passes,
            Self::gate_wasm_compiles,
        ]
    }
}

impl fmt::Display for ProofGate {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.label())
    }
}