Skip to main content

Args

Struct Args 

Source
pub struct Args {
Show 34 fields pub paths: Vec<PathBuf>, pub format: Option<FormatChoice>, pub table: Option<String>, pub hive: bool, pub compression: Option<CompressionFormat>, pub dict: Vec<PathBuf>, pub follow: bool, pub tee: Option<PathBuf>, pub tee_raw: bool, pub force: bool, pub hex: bool, pub hex_width: Option<u16>, pub view: Option<String>, pub temp_dir: Option<PathBuf>, pub delimiter: Option<u8>, pub no_header: bool, pub header_rows: Vec<u64>, pub footer_rows: Option<usize>, pub skip_rows: Option<usize>, pub skip_lines: Option<usize>, pub comment: Option<String>, pub skip_initial_space: Option<bool>, pub null: Vec<String>, pub infer_types: Option<InferTypes>, pub infer_rows: Option<usize>, pub ignore_errors: Option<bool>, pub row_numbers: Option<bool>, pub number_format: Option<String>, pub mouse: Option<bool>, pub sample_rows: Option<usize>, pub config: Vec<Override>, pub log_file: Option<PathBuf>, pub log_level: Option<String>, pub command: Option<Command>,
}
Expand description

Command-line arguments for datui.

A flag exists when one invocation needs it: what to open, how to read this file, what to do at start. Everything else is config, set for one run with -c. A flag that sets a config key takes its help from the option registry.

Fields§

§paths: Vec<PathBuf>

Files, directories, globs or URLs to open; files of one shape are one table. - reads standard input, as does no PATH when data is piped in. No PATH opens the home screen

§format: Option<FormatChoice>§table: Option<String>§hive: bool

Read a glob as one partitioned table, or force partition columns on a directory whose layout does not say so. Ignored for a single file

§compression: Option<CompressionFormat>

Compression, when the extension does not say: gzip, zstd, bzip2 or xz

§dict: Vec<PathBuf>

A dictionary to decode with, over those on the format search path: QuickFIX XML (.xml) for FIX logs, DBC (.dbc) for CAN logs, or TOML with kind = “fix” or “dbc”. Repeatable

§follow: bool

Follow the file as it grows, as tail -f does: a local CSV, TSV, PSV or NDJSON file or Arrow IPC stream, or standard input (-). t pauses and resumes; Esc stops

§tee: Option<PathBuf>

Record standard input to FILE while viewing it. With -, pass it on to standard output, as tee does, and draw on the terminal

§tee_raw: bool

With –tee: keep FILE exactly as the bytes came. Otherwise a stream that left its header’s sizes blank has them filled in when it ends

§force: bool

With –tee: replace FILE if it is there

§hex: bool

Open in the hex view, whatever the file holds

§hex_width: Option<u16>

Bytes a row of the hex view holds, so records line up (default: 8, 16, 32 or 64, as many as fit)

§view: Option<String>

Apply a saved view by name once the data is on screen

§temp_dir: Option<PathBuf>§delimiter: Option<u8>

Column separator: one character, tab, \t or a code such as 0x1f (default: , for .csv, tab for .tsv, | for .psv)

§no_header: bool

Read the first row as data; columns are named column_1, column_2, …

§header_rows: Vec<u64>

The line, or comma-separated lines, holding the header, counted from 1 before anything is skipped. Several are joined per column ([csv] header_join); the data starts after the last

§footer_rows: Option<usize>

Skip this many rows at the end, such as a footer. Reads the whole file to count rows

§skip_rows: Option<usize>

Skip this many rows at the start; the header is read after them. Quote-aware, unlike –skip-lines

§skip_lines: Option<usize>

Skip this many raw lines at the start, split on newlines alone: a newline inside quotes counts

§comment: Option<String>§skip_initial_space: Option<bool>§null: Vec<String>§infer_types: Option<InferTypes>§infer_rows: Option<usize>§ignore_errors: Option<bool>§row_numbers: Option<bool>§number_format: Option<String>§mouse: Option<bool>§sample_rows: Option<usize>§config: Vec<Override>

Set a config key for this run, as in the file: -c display.row_numbers=true. Repeatable; a flag of the key’s own still wins. datui config keys lists them

§log_file: Option<PathBuf>§log_level: Option<String>§command: Option<Command>

Trait Implementations§

Source§

impl Args for Args

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 Clone for Args

Source§

fn clone(&self) -> Self

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 CommandFactory for Args

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Args

Source§

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

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

impl FromArgMatches for Args

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

impl Parser for Args

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnsafeUnpin for Args

§

impl UnwindSafe for Args

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.