pub struct LoggingArgs {
pub log_format: String,
pub log_level: String,
pub log_color: String,
pub log_output: String,
pub log_source: bool,
pub debug: bool,
}Expand description
Ported from the flags returned by Flags(). Meant to be
#[command(flatten)]d into a parent clap::Parser struct, which is
the clap equivalent of Go’s “append this slice of flags to any app”.
Fields§
§log_format: String§log_level: String§log_color: String§log_output: String§log_source: bool§debug: boolTrait Implementations§
Source§impl Args for LoggingArgs
impl Args for LoggingArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§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 LoggingArgs
impl Debug for LoggingArgs
Source§impl Default for LoggingArgs
Matches each flag’s default_value, so a caller that builds a
LoggingArgs without parsing a command line gets the same logging as one
that parsed no flags. (A derived Default gave empty strings here, which
made the default logger fail to build.)
impl Default for LoggingArgs
Matches each flag’s default_value, so a caller that builds a
LoggingArgs without parsing a command line gets the same logging as one
that parsed no flags. (A derived Default gave empty strings here, which
made the default logger fail to build.)
Source§impl FromArgMatches for LoggingArgs
impl FromArgMatches for LoggingArgs
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 LoggingArgs
impl RefUnwindSafe for LoggingArgs
impl Send for LoggingArgs
impl Sync for LoggingArgs
impl Unpin for LoggingArgs
impl UnsafeUnpin for LoggingArgs
impl UnwindSafe for LoggingArgs
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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