Skip to main content

ConformanceAdapter

Trait ConformanceAdapter 

Source
pub trait ConformanceAdapter {
    // Required methods
    fn parse_and_validate(&self, toml: &str) -> Result<Plan, Vec<String>>;
    fn conformance_level(&self) -> ConformanceLevel;
    fn host_name(&self) -> &str;
}
Expand description

Interface a host must implement to run the conformance suite.

The adapter is the host’s bridge to the shared types. It provides:

  • A TOML parser + validator (usually just toml::from_str + Plan::validate).
  • The host’s declared conformance level.
  • A human-readable host name for test reports.

Required Methods§

Source

fn parse_and_validate(&self, toml: &str) -> Result<Plan, Vec<String>>

Parse a TOML string into a Plan and validate it.

Returns the parsed Plan on success, or a list of human-readable error messages on failure.

Source

fn conformance_level(&self) -> ConformanceLevel

The conformance level this host claims.

Source

fn host_name(&self) -> &str

Human-readable host name for test reports.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§