pub struct ProtocolArgs {
pub agent: Option<String>,
pub project: Option<String>,
pub project_root: Option<PathBuf>,
pub format: Option<OutputFormat>,
}Expand description
Shared flags for all protocol subcommands.
Fields§
§agent: Option<String>Agent name (default: $AGENT or config defaultAgent)
project: Option<String>Project name (default: from .edict.toml)
project_root: Option<PathBuf>Project root directory
format: Option<OutputFormat>Output format
Implementations§
Source§impl ProtocolArgs
impl ProtocolArgs
Sourcepub fn resolve_agent(&self, config: &Config) -> String
pub fn resolve_agent(&self, config: &Config) -> String
Resolve the effective agent name from flag, env, or config.
Sourcepub fn resolve_project(&self, config: &Config) -> String
pub fn resolve_project(&self, config: &Config) -> String
Resolve the effective project name from flag or config.
Sourcepub fn resolve_format(&self) -> OutputFormat
pub fn resolve_format(&self) -> OutputFormat
Resolve the effective output format from flag or TTY detection.
Trait Implementations§
Source§impl Args for ProtocolArgs
impl Args for ProtocolArgs
Source§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 ProtocolArgs
impl Debug for ProtocolArgs
Source§impl FromArgMatches for ProtocolArgs
impl FromArgMatches for ProtocolArgs
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 ProtocolArgs
impl RefUnwindSafe for ProtocolArgs
impl Send for ProtocolArgs
impl Sync for ProtocolArgs
impl Unpin for ProtocolArgs
impl UnsafeUnpin for ProtocolArgs
impl UnwindSafe for ProtocolArgs
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