Identifies verifiers that are used to directly validate signatures on artifacts.
For a Rolefoo, in artifact verifier mode, the purpose is represented as foo.
That is, Mode::ArtifactVerifier is represented in the purpose by an empty string
(and no additional dash).
Identifies verifiers that are used to ascertain the authenticity of verifiers used to
directly validate signatures on artifacts.
For a Rolefoo, in trust anchor mode, the purpose is represented as
trust-anchor-foo.
That is, Mode::TrustAnchor is represented in the purpose by the string “trust-anchor”
(and an additional dash).
use voa_core::identifiers::Mode;
use winnow::Parser;
assert_eq!(Mode::parser.parse("")?, Mode::ArtifactVerifier);
assert_eq!(Mode::parser.parse("trust-anchor")?, Mode::TrustAnchor);
assert!(Mode::parser.parse("test").is_err());