pub struct Cli {
pub incremental: bool,
pub since_start: bool,
pub monotonic: bool,
pub relative: bool,
pub utc: bool,
pub tz: Option<String>,
pub strict: bool,
pub no_strict: bool,
pub format: Option<String>,
pub subcommand: Option<CliCommand>,
}cli only.Expand description
rusty-ts — prefix each line of stdin with a timestamp. A Rust port of
moreutils ts.
Fields§
§incremental: boolRender elapsed time since the previous input line instead of absolute time.
since_start: boolRender elapsed time since program start instead of absolute time.
monotonic: boolUse a monotonic clock source for elapsed-time calculations.
Has no effect unless -i or -s is also present.
relative: boolConvert recognized in-line timestamps to relative form rather than prefixing new timestamps. Default mode recognizes ISO-8601, RFC-3339, and Unix epoch; Strict mode expands to the full moreutils set.
utc: boolForce timestamps to be rendered in UTC, overriding system local time
and the TZ env var. Rejected in Strict mode.
tz: Option<String>Render timestamps in the named IANA timezone (e.g., America/New_York).
Resolved once at startup; per-line render cost is a fixed-offset
conversion. Rejected in Strict mode.
strict: boolSwitch into Strict moreutils Compatibility Mode. Rejects -u, --tz,
and other Rusty-only flags; expands -r to the full moreutils set;
mirrors moreutils --help / --version layout; ignores
RUSTY_TS_FORMAT.
no_strict: boolForce Default mode, overriding RUSTY_TS_STRICT env var and argv[0]
auto-detection.
format: Option<String>Optional strftime format string. If omitted, uses the moreutils
default format (%b %d %H:%M:%S) or the RUSTY_TS_FORMAT env var
(Default mode only). A positional argument always wins over the env var.
subcommand: Option<CliCommand>Implementations§
Source§impl Cli
impl Cli
Sourcepub fn explicit_compat_choice(&self) -> Option<ExplicitChoice>
pub fn explicit_compat_choice(&self) -> Option<ExplicitChoice>
Compute the explicit-choice signal for the mode resolver. Returns
None if neither --strict nor --no-strict was supplied.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
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 CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
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.