pub enum Program {
Native,
Shell,
}Expand description
Which program answers to a command word: the shell tool, or the Rust executable. A word both answer to names both, in this order.
These are two of the command graph’s crate::command_graph::Origins, read from the
same declarations: Native is a runnable command of the executable
(Origin::Executable), and Shell a command of the shell tool (Origin::Tool), whose
registry share/commands.yaml both read. A group of the executable that only holds
other commands, such as majordomus evidence, is not a command the executable answers
to. Case 507 holds the command subjects and their programs equal to the command graph’s.
use majordomus_cli::evidence::subject::Program;
assert!(Program::Native < Program::Shell);
assert_eq!(serde_json::to_value(Program::Shell).unwrap(), "shell");Variants§
Native
The Rust executable: a documented example path or a capability’s command-line path.
cli::validate gives every runnable command an example and refuses one on a group,
so these are exactly the executable’s runnable commands.
Shell
The shell tool: a public command of its registry.
Trait Implementations§
impl Copy for Program
Source§impl<'de> Deserialize<'de> for Program
impl<'de> Deserialize<'de> for Program
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Program
Source§impl Ord for Program
impl Ord for Program
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Program
impl PartialOrd for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.