Skip to main content

TrackerArgs

Struct TrackerArgs 

Source
pub struct TrackerArgs {
Show 13 fields pub stdout: bool, pub stdout_level: Level, pub stdout_filter_regex: String, pub binary: bool, pub binary_level: Level, pub binary_filter_regex: String, pub binary_file: String, pub perfetto: bool, pub perfetto_level: Level, pub perfetto_filter_regex: String, pub perfetto_file: String, pub monitor_window_ticks: Option<u64>, pub monitor_filter_regex: String,
}
Expand description

Standard command-line arguments for tracker configuration.

Fields§

§stdout: bool

Enable logging to the console.

§stdout_level: Level

Level of log message to display.

§stdout_filter_regex: String

Set a regular expression for which entities should have logging level set to --stdout-level. Others will have level set to Error.

§binary: bool

Enable logging to binary file used by gwr-spotter.

§binary_level: Level

Level of binary trace events to record.

§binary_filter_regex: String

Set a regular expression for which entities should have binary output level set to --binary-level. Others will have level set to Error.

§binary_file: String

The filename binary trace output is written to.

§perfetto: bool

Enable logging to Perfetto file used by gwr-spotter.

§perfetto_level: Level

Level of Perfetto trace events to record.

§perfetto_filter_regex: String

Set a regular expression for which entities should have Perfetto output level set to --perfetto-level. Others will have level set to Error.

§perfetto_file: String

The filename Perfetto trace output is written to.

§monitor_window_ticks: Option<u64>

Enable monitoring at the specified number of clock ticks.

§monitor_filter_regex: String

Set a regular expression for which ports should have monitors enabled.

Implementations§

Source§

impl TrackerArgs

Source

pub fn tracking_requested(&self) -> bool

Return whether any tracker output has been explicitly requested.

Source

pub fn level_enabled(&self, level: Level) -> bool

Return whether any configured tracker will emit messages at level.

Source

pub fn ensure_visiblity( &mut self, feature: bool, feature_name: &str, level: Level, )

Ensure that if the specified feature is enabled then a tracker will be showing messages of that level

Source

pub fn trackers_config(&self) -> TrackersConfig<'_>

Convert these command-line arguments into a TrackersConfig.

Trait Implementations§

Source§

impl Args for TrackerArgs

Source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

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 more
Source§

impl Clone for TrackerArgs

Source§

fn clone(&self) -> TrackerArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TrackerArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for TrackerArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

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>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.