pub struct CachedArgs {
pub duration: Duration,
pub key: CachedKeyArgs,
pub no_cached_output: bool,
pub exit_code: bool,
pub verbose: bool,
pub cmd: CommandArgs,
}Fields§
§duration: DurationDuration after which the cache should be invalidated, e.g. “30 min” or “1 day -1 hour”.
key: CachedKeyArgs§no_cached_output: boolWhen loading from cache, do not show the previous output.
exit_code: boolUse exit code 0 if the command is cached, and exit code 255 if it ran successfully.
verbose: boolPrint extra information, e.g. whether the command was run or not.
cmd: CommandArgsImplementations§
Source§impl CachedArgs
impl CachedArgs
pub fn any_explicit_key(&self) -> bool
Trait Implementations§
Source§impl Args for CachedArgs
impl Args for CachedArgs
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 CommandFactory for CachedArgs
impl CommandFactory for CachedArgs
Source§impl Debug for CachedArgs
impl Debug for CachedArgs
Source§impl Default for CachedArgs
impl Default for CachedArgs
Source§impl FromArgMatches for CachedArgs
impl FromArgMatches for CachedArgs
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.Source§impl Parser for CachedArgs
impl Parser for CachedArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Source§impl PartialEq for CachedArgs
impl PartialEq for CachedArgs
impl StructuralPartialEq for CachedArgs
Auto Trait Implementations§
impl Freeze for CachedArgs
impl RefUnwindSafe for CachedArgs
impl Send for CachedArgs
impl Sync for CachedArgs
impl Unpin for CachedArgs
impl UnwindSafe for CachedArgs
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more