pub enum KnowledgeCommand {
Candidates,
Record {
id: String,
},
Status,
}Expand description
The subcommands of majordomus knowledge.
§Example
use majordomus_cli::cli::{Cli, Command, KnowledgeCommand};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "knowledge", "record", "e1-0123456789ab"]).unwrap();
let Command::Knowledge(args) = cli.command else { panic!("not the knowledge command") };
assert!(matches!(args.command, KnowledgeCommand::Record { id } if id == "e1-0123456789ab"));
assert!(Cli::try_parse_from(["majordomus", "knowledge"]).is_err(), "a subcommand is required");Variants§
Candidates
The candidate records awaiting review, with the branch of the episode each came from and how long each has waited
Record
One knowledge record by id: its front matter, and every reference it names resolved against the index, the ledger and git
Status
Whether the deriver is still writing: the last derivation, the newest closed episode, and the stopped-writer judgement against session.freshness
Trait Implementations§
Source§impl Debug for KnowledgeCommand
impl Debug for KnowledgeCommand
Source§impl FromArgMatches for KnowledgeCommand
impl FromArgMatches for KnowledgeCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for KnowledgeCommand
impl Subcommand for KnowledgeCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for KnowledgeCommand
impl RefUnwindSafe for KnowledgeCommand
impl Send for KnowledgeCommand
impl Sync for KnowledgeCommand
impl Unpin for KnowledgeCommand
impl UnsafeUnpin for KnowledgeCommand
impl UnwindSafe for KnowledgeCommand
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
Mutably borrows from an owned value. Read more