pub struct TableOptions {
pub columns: Option<Vec<String>>,
pub header: HeaderMode,
}Expand description
Per-invocation tabular options resolved from the CLI flags by
FormatArgs::table_options() (step 4). Lives here so it can be
construction-time validated (syntax only — unknown-name validation
happens inside the engine where the per-noun column set is known).
Default gives the unflagged behaviour: all columns, header on.
Fields§
§columns: Option<Vec<String>>User-supplied --columns selection, validated for syntax by
table_options(): non-empty, no blank segments, no duplicates.
None means the flag was not supplied.
header: HeaderModeResolved header mode. On is the unflagged default.
Implementations§
Source§impl TableOptions
impl TableOptions
Sourcepub fn projected(&self) -> Option<Vec<&str>>
pub fn projected(&self) -> Option<Vec<&str>>
Borrow the column projection as Option<Vec<&str>>, ready to pass to
TableSpec::projected.
Returns None when --columns was not supplied (engine falls through
to default_columns or all_columns). Returns Some(vec) when the
flag was supplied; each element borrows from self.columns.