ProcessArgs

Struct ProcessArgs 

Source
pub struct ProcessArgs {
Show 22 fields pub input: PathBuf, pub output: Option<PathBuf>, pub schema: Option<PathBuf>, pub index: Option<PathBuf>, pub index_variant: Option<String>, pub sort: Vec<String>, pub columns: Vec<String>, pub exclude_columns: Vec<String>, pub derives: Vec<String>, pub filters: Vec<String>, pub filter_exprs: Vec<String>, pub row_numbers: bool, pub limit: Option<usize>, pub delimiter: Option<u8>, pub output_delimiter: Option<u8>, pub input_encoding: Option<String>, pub output_encoding: Option<String>, pub boolean_format: BooleanFormat, pub preview: bool, pub table: bool, pub apply_mappings: bool, pub skip_mappings: bool,
}

Fields§

§input: PathBuf

Input CSV file to process

§output: Option<PathBuf>

Output CSV file (stdout if omitted)

§schema: Option<PathBuf>

Schema file to drive typed operations and apply value replacements

§index: Option<PathBuf>

Existing index file to speed up operations

§index_variant: Option<String>

Specific index variant name to use from the selected index file

§sort: Vec<String>

Sort directives of the form column[:asc|desc]

§columns: Vec<String>

Restrict output to this comma-separated list of columns

§exclude_columns: Vec<String>

Exclude this comma-separated list of columns from output

§derives: Vec<String>

Additional derived columns using name=expression

§filters: Vec<String>

Row-level filters such as amount>=100 or status = shipped

§filter_exprs: Vec<String>

Evalexpr-based filter expressions that must evaluate to truthy values

§row_numbers: bool

Emit 1-based row numbers as the first column

§limit: Option<usize>

Limit number of rows emitted

§delimiter: Option<u8>

CSV delimiter character for reading input

§output_delimiter: Option<u8>

Delimiter to use for output (defaults to input delimiter)

§input_encoding: Option<String>

Character encoding of the input file (defaults to utf-8)

§output_encoding: Option<String>

Character encoding for the output file/stdout (defaults to utf-8)

§boolean_format: BooleanFormat

Normalize boolean columns in output

§preview: bool

Render results as a preview table on stdout (disables –output and defaults the row limit)

§table: bool

Render output as an elastic table to stdout

§apply_mappings: bool

Apply schema-defined datatype mappings before replacements (auto when available)

§skip_mappings: bool

Skip schema-defined datatype mappings even if they exist

Trait Implementations§

Source§

impl Args for ProcessArgs

Source§

fn group_id() -> Option<Id>

Report the 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 Debug for ProcessArgs

Source§

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

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

impl FromArgMatches for ProcessArgs

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> 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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.