pub struct ClientArgs {
pub config: Option<PathBuf>,
pub endpoint: Option<String>,
pub timeout: Option<u64>,
pub cache_path: Option<PathBuf>,
pub log_level: Option<LogLevel>,
pub log_format: Option<LogFormat>,
pub quiet: bool,
pub max_retries: Option<u32>,
pub retry_delay: Option<u64>,
pub no_shared_storage: bool,
pub transfer_chunk_size: Option<usize>,
}Expand description
Shared command line arguments for the ModelExpress client.
§Adding New Arguments
This struct is the single source of truth for client CLI arguments and environment variables. It is shared between:
- The
modelexpress-clibinary (via#[command(flatten)]in theClistruct) - Any other client binaries that need these arguments
- The
ClientConfig::load()function which applies these values
When adding a new argument:
- Add the field here with appropriate
#[arg(...)]attributes - Include
env = "MODEL_EXPRESS_..."for environment variable support - Update
ClientConfig::load()to apply the new argument to the config - Add tests in the
testsmodule below - Update CLI.md documentation if applicable
§Short Flags
Avoid using -v as a short flag here - it’s reserved for the CLI’s --verbose flag
which uses -v, -vv, -vvv counting. The CLI embeds this struct via flatten,
so short flag conflicts will cause runtime panics.
Fields§
§config: Option<PathBuf>Configuration file path
endpoint: Option<String>Server endpoint
timeout: Option<u64>Request timeout in seconds
cache_path: Option<PathBuf>Cache path override
log_level: Option<LogLevel>Log level (no short flag to avoid conflict with CLI’s -v/–verbose)
log_format: Option<LogFormat>Log format
quiet: boolQuiet mode (suppress all output except errors)
max_retries: Option<u32>Maximum number of retries
retry_delay: Option<u64>Retry delay in seconds
Disable shared storage mode (will transfer files from server to client)
transfer_chunk_size: Option<usize>Chunk size in bytes for file transfer when shared storage is disabled
Trait Implementations§
Source§impl Args for ClientArgs
impl Args for ClientArgs
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
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for ClientArgs
impl Clone for ClientArgs
Source§fn clone(&self) -> ClientArgs
fn clone(&self) -> ClientArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandFactory for ClientArgs
impl CommandFactory for ClientArgs
Source§impl Debug for ClientArgs
impl Debug for ClientArgs
Source§impl FromArgMatches for ClientArgs
impl FromArgMatches for ClientArgs
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>
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>
ArgMatches to self.Source§impl Parser for ClientArgs
impl Parser for ClientArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for ClientArgs
impl RefUnwindSafe for ClientArgs
impl Send for ClientArgs
impl Sync for ClientArgs
impl Unpin for ClientArgs
impl UnwindSafe for ClientArgs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request