Skip to main content

asimov_patterns/
capabilities.rs

1// This is free and unencumbered software released into the public domain.
2
3//! Caller-supplied metadata about a program's native option support.
4//!
5//! Capabilities describe the program, while options describe the requested
6//! operation. Discovery and manifest parsing belong to the caller. These values
7//! neither probe a program nor select an emulation strategy.
8
9/// Knowledge of a program's native support for an optional command-line option.
10///
11/// This is a declaration, not a guarantee of correct behavior or support for
12/// every possible option value. Hosts document how unknown and unsupported
13/// capabilities affect execution. Required options do not need capability flags.
14#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub enum OptionSupport {
16    /// No support information was supplied; this does not mean unsupported.
17    #[default]
18    Unknown,
19    /// The program is declared to support this option natively.
20    Supported,
21    /// The program is declared not to support this option natively. A host must
22    /// emulate a requested operation or reject it rather than silently omit it.
23    Unsupported,
24}