pub struct GuardHookArgs {
pub provider: String,
pub repo: Option<PathBuf>,
}Expand description
guard hook: the provider whose payload stdin carries, and the repository.
use majordomus_cli::cli::{Cli, Command, GuardCommand, GuardHookArgs};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "guard", "hook"]).unwrap();
let Command::Guard(guard) = cli.command else { panic!("expected `guard`") };
let GuardCommand::Hook(GuardHookArgs { provider, repo }) = guard.command;
assert_eq!(provider, "claude-code", "the provider whose payload shape is known");
assert_eq!(repo, None);Fields§
§provider: StringThe provider whose payload stdin carries; its session id on the mesh is <provider>-<session_id>
repo: Option<PathBuf>Where a relative path in the payload is resolved from (default: the current directory); the checkout judged is the one the written file belongs to
Trait Implementations§
Source§impl Args for GuardHookArgs
impl Args for GuardHookArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Debug for GuardHookArgs
impl Debug for GuardHookArgs
Source§impl FromArgMatches for GuardHookArgs
impl FromArgMatches for GuardHookArgs
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(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for GuardHookArgs
impl RefUnwindSafe for GuardHookArgs
impl Send for GuardHookArgs
impl Sync for GuardHookArgs
impl Unpin for GuardHookArgs
impl UnsafeUnpin for GuardHookArgs
impl UnwindSafe for GuardHookArgs
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