pub struct CommonFlags {
pub auth_type: Option<String>,
pub username: Option<String>,
pub trace: bool,
}Expand description
Common flags shared by shortcut commands.
--verbose is intentionally absent here; it lives on the root Cli
as a global flag with XURL_VERBOSE env backing, so subcommands inherit
it without local duplication.
Fields§
§auth_type: Option<String>Authentication type (oauth1, oauth2, app)
username: Option<String>OAuth2 username to act as
trace: boolAdd X-B3-Flags trace header
Implementations§
Source§impl CommonFlags
impl CommonFlags
Sourcepub fn to_call_options(&self, verbose: bool, timeout_secs: u64) -> CallOptions
pub fn to_call_options(&self, verbose: bool, timeout_secs: u64) -> CallOptions
Converts to CallOptions for shortcut methods.
verbose and timeout_secs are sourced from the root Cli global
flags rather than per-subcommand, so the caller threads them through
here.
Sourcepub fn to_call_options_with_cursor(
&self,
verbose: bool,
timeout_secs: u64,
cursor: Option<&str>,
) -> CallOptions
pub fn to_call_options_with_cursor( &self, verbose: bool, timeout_secs: u64, cursor: Option<&str>, ) -> CallOptions
Like to_call_options but with an explicit cursor / pagination
token. The runner threads the global --cursor (or --after /
XURL_CURSOR / XURL_AFTER) here so list shortcuts can append it to
their URL.
Trait Implementations§
Source§impl Args for CommonFlags
impl Args for CommonFlags
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 Clone for CommonFlags
impl Clone for CommonFlags
Source§fn clone(&self) -> CommonFlags
fn clone(&self) -> CommonFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommonFlags
impl Debug for CommonFlags
Source§impl FromArgMatches for CommonFlags
impl FromArgMatches for CommonFlags
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 CommonFlags
impl RefUnwindSafe for CommonFlags
impl Send for CommonFlags
impl Sync for CommonFlags
impl Unpin for CommonFlags
impl UnsafeUnpin for CommonFlags
impl UnwindSafe for CommonFlags
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