Skip to main content

require_axis_value

Macro require_axis_value 

Source
macro_rules! require_axis_value {
    ($axis:literal, $key:literal) => { ... };
}
Expand description

require_axis_value!(<axis>, <key>) — build a RequiredCapability::AxisKey matching any tag with the given (axis, key) pair (presence OR value). Useful for “any version of this thing” intents — e.g. require_axis_value!("software", "model") matches software.model, software.model:llama-7b, or software.model=mistral-large interchangeably.

require_axis_value!("software", "model");
require_axis_value!("hardware", "gpu");

Panics on unknown axis spelling or empty key.