Skip to main content

DataTableState

Struct DataTableState 

Source
pub struct DataTableState {
    pub table_state: TableState,
    pub visible_rows: usize,
    pub termcol_index: usize,
    pub visible_termcols: usize,
    pub suppress_error_display: bool,
    pub needs_recollect: bool,
    /* private fields */
}

Fields§

§table_state: TableState§visible_rows: usize§termcol_index: usize§visible_termcols: usize§suppress_error_display: bool§needs_recollect: bool

Set by the render code when visible_rows changes. The App event loop checks this after each render and triggers an async collect if needed.

Implementations§

Source§

impl DataTableState

Source

pub fn new( lf: LazyFrame, pages_lookahead: Option<usize>, pages_lookback: Option<usize>, max_buffered_rows: Option<usize>, max_buffered_mb: Option<usize>, polars_streaming: bool, ) -> Result<Self>

Source

pub fn from_lazyframe(lf: LazyFrame, options: &OpenOptions) -> Result<Self>

Create state from an existing LazyFrame (e.g. from Python or in-memory). Uses OpenOptions for display/buffer settings.

Source

pub fn from_schema_and_lazyframe( schema: Arc<Schema>, lf: LazyFrame, options: &OpenOptions, partition_columns: Option<Vec<String>>, ) -> Result<Self>

Create state from a pre-collected schema and LazyFrame (for phased loading). Does not call collect_schema(); df is None so the UI can render headers while the first collect() runs. When partition_columns is Some (e.g. hive), column order is partition cols first.

Source

pub fn with_open(self, facts: OpenFacts) -> Self

The state as its open found the dataset: everything in facts, given at once.

The one way an open’s findings reach a state, taken while it is still the data as loaded. Applied in the order they depend on each other: the files before their row groups, which set the count. Once on screen, a dataset learns more only through Self::join_dataset_schema and Self::count_landed.

Source

pub fn reset(&mut self)

Back to the table as opened: the data as loaded, nothing applied, and every column’s width learned afresh from the first page.

Source

pub fn from_parquet(path: &Path, options: &OpenOptions) -> Result<Self>

Source

pub fn from_parquet_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Source

pub fn from_ipc(path: &Path, options: &OpenOptions) -> Result<Self>

Load a single Arrow IPC / Feather v2 file (lazy).

Source

pub fn from_ipc_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple Arrow IPC / Feather files and concatenate into one LazyFrame.

Source

pub fn from_avro(path: &Path, options: &OpenOptions) -> Result<Self>

Load a single Avro file (eager read, then lazy).

Source

pub fn from_avro_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple Avro files and concatenate into one LazyFrame.

Source

pub fn from_excel(path: &Path, options: &OpenOptions) -> Result<Self>

Load a single Excel file (xls, xlsx, xlsm, xlsb) using calamine (eager read, then lazy). Sheet is selected by name, or by 0-based index when no sheet is so named, via options.table (--table).

Source

pub fn from_orc(path: &Path, options: &OpenOptions) -> Result<Self>

Load a single ORC file (eager read via orc-rust → Arrow, then convert to Polars, then lazy). ORC is read fully into memory; see docs/formats/columnar-and-json.md.

Source

pub fn from_orc_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple ORC files and concatenate into one LazyFrame.

Source

pub fn scan_parquet_hive(path: &Path) -> Result<LazyFrame>

Build a LazyFrame for hive-partitioned Parquet only (no schema collection, no partition discovery). Use this for phased loading so “Scanning input” is instant; schema and partition handling are the schema phase’s.

Source

pub fn scan_parquet_hive_with_schema( path: &Path, schema: Arc<Schema>, ) -> Result<LazyFrame>

Build a LazyFrame for hive-partitioned Parquet with a pre-computed schema (avoids slow collect_schema across all files).

Source

pub fn schema_from_one_hive_parquet( path: &Path, ) -> Result<(Arc<Schema>, Vec<String>)>

Infer schema from one parquet file in a hive directory and merge with partition columns. Returns (merged_schema, partition_columns). Use with scan_parquet_hive_with_schema to avoid slow collect_schema(). Only supported when path is a directory (not a glob). Returns Err if no parquet file found or read fails.

Source

pub fn discover_hive_partition_columns(path: &Path) -> Vec<String>

Discover hive partition column names (public for phased loading). Directory: single-spine walk; glob: parse pattern.

Source

pub fn from_parquet_hive( path: &Path, pages_lookahead: Option<usize>, pages_lookback: Option<usize>, max_buffered_rows: Option<usize>, max_buffered_mb: Option<usize>, row_numbers: bool, row_start_index: usize, ) -> Result<Self>

Load Parquet with Hive partitioning from a directory or glob path. When path is a directory, partition columns are discovered from path structure. When path contains glob (e.g. **/*.parquet), partition columns are inferred from the pattern (e.g. year=*/month=*). Partition columns are moved to the left in the initial LazyFrame before state is created.

Performance: The slow part is Polars, not our code. scan_parquet + collect_schema() trigger path expansion (full directory tree or glob) and parquet metadata reads; we only do a single-spine walk for partition key discovery and cheap schema/select work.

Source

pub fn set_row_numbers(&mut self, enabled: bool)

Source

pub fn toggle_row_numbers(&mut self) -> bool

# on or off. Returns whether the view’s frame changed and its rows need reading again: a sorted or filtered view of data with no place of its own numbers its rows once # is on.

Source

pub fn row_numbers(&self) -> bool

Whether the row-number column is shown.

Source

pub fn row_start_index(&self) -> usize

Row number display start (0 or 1); used by go-to-line to interpret user input.

Source

pub fn from_csv(path: &Path, options: &OpenOptions) -> Result<Self>

Source

pub fn from_delimited( path: &Path, delimiter: u8, options: &OpenOptions, ) -> Result<Self>

A delimited text file, split on delimiter (its format’s separator) unless --delimiter says otherwise. CSV, TSV and PSV are one reader, so every CSV option means the same thing for all three.

Source

pub fn from_csv_customize<F>( path: &Path, pages_lookahead: Option<usize>, pages_lookback: Option<usize>, max_buffered_rows: Option<usize>, max_buffered_mb: Option<usize>, func: F, ) -> Result<Self>

Source

pub fn from_csv_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple CSV files (uncompressed) and concatenate into one LazyFrame.

Source

pub fn from_json(path: &Path, options: &OpenOptions) -> Result<Self>

Source

pub fn from_json_lines(path: &Path, options: &OpenOptions) -> Result<Self>

Source

pub fn from_json_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple JSON (array) files and concatenate into one LazyFrame.

Source

pub fn from_json_lines_paths( paths: &[impl AsRef<Path>], options: &OpenOptions, ) -> Result<Self>

Load multiple JSON Lines files and concatenate into one LazyFrame.

Source

pub fn scroll_would_trigger_collect(&self, rows: i64) -> bool

Returns true if a scroll by rows would trigger a collect (view would leave the buffer). Used so the UI only shows the throbber when actual data loading will occur.

Source

pub fn slide_table(&mut self, rows: i64) -> bool

Update scroll position. If the view is within the buffer, re-slices display. If outside the buffer, sets the position but the caller must trigger a collect (synchronous or async) to load the new buffer range. Returns true if a collect is needed (view is outside the current buffer).

Source

pub fn collect(&mut self)

Source

pub fn prepare_async_collect( &mut self, num_rows_override: Option<usize>, ) -> Option<CollectRequest>

Source

pub fn apply_async_collect(&mut self, result: CollectResult)

Apply the result of a background buffer load. The worker has already stitched and cut it (FillPlan::fit): installing it copies nothing.

Source

pub fn sampled(&self) -> Option<&Sampled>

The view’s sample, while it has one.

Source

pub fn unsampled(&self) -> &DataTableState

The view the sample was drawn from, or this one when it has none: where a new sample is drawn from.

Source

pub fn analysis_lf(&self) -> LazyFrame

Whether the frame on screen still grows from the dataset’s own scan.

A filter and a sort do: apply_transformations rebuilds them over whatever the root is, so widening the root under them is exactly what should happen. A query, a SQL statement, a fuzzy search, a pivot, a melt and a drill-down do not — each makes its own result the root, with its own columns, and replacing the root underneath one leaves the view naming columns the frame no longer has.

grouped and drilled_down_group_index are set together by a drill down and cleared together by a drill up, so asking both is belt and braces — kept because what they guard is the frame being rebuilt under a view of one group of it. The frame an analysis reads: the view as filtered and queried, without its order. No statistic depends on the order, and a sort is the one step that makes a sampled read of a huge table read all of it.

Source

pub fn preview_lf(&self) -> LazyFrame

What the Pivot & Melt builder previews a few rows of: the view as the user sees its columns, without its order. A sort would make the head of a large table a read of all of it.

Source

pub fn is_sorted(&self) -> bool

Whether the view has a sort, which Self::preview_lf leaves out.

Source

pub fn scan_is_the_root(&self) -> bool

Source

pub fn measurements(&self) -> &Arc<Meter> ⓘ

What finding and reading this dataset cost.

Source

pub fn parquet_count_dir(&self) -> Option<PathBuf>

The directory whose Parquet footers can be summed for an exact row count, if the current lf still allows it. See parquet_count_dir.

Source

pub fn len_generation(&self) -> u64

Current count generation. A background len() task captures this; its result is only applied if the generation still matches (i.e. the data hasn’t changed since).

Source

pub fn num_rows_if_valid(&self) -> Option<usize>

Returns the cached row count when valid (same value shown in the control bar). Use this to avoid an extra full scan for analysis/describe when the table has already been collected.

Source

pub fn is_num_rows_valid(&self) -> bool

True when num_rows reflects the current lf. Used by App to decide whether to dispatch a background len() query before planning the buffer collect.

Source

pub fn total_rows_when_subset(&self) -> Option<usize>

The dataset’s full row count for the control bar, when the rows on screen are a subset of it: a sidebar filter, a query in any bar or a drill-down is active and the count from before it was applied is known. A pivot or melt makes rows that are not the dataset’s, so the comparison would mislead and none is offered. Cheap by construction: it only reads what a pristine collect already knew.

Source

pub fn lf_clone(&self) -> LazyFrame

Clone of the LazyFrame for off-thread queries (e.g. background len()).

Source

pub fn polars_streaming_enabled(&self) -> bool

Whether the current LazyFrame should use Polars streaming engine.

Source

pub fn buffered_start(&self) -> usize

Start row of the currently buffered range.

Source

pub fn buffered_end(&self) -> usize

End row (exclusive) of the currently buffered range.

Source

pub fn is_remote_source(&self) -> bool

True for a scan of an object store in place.

Polars fetches a Parquet row group whole for any slice that touches it and keeps nothing between collects, so the small, proximity-driven refills that suit a local file each download the same row group again: paging through one row group cost a fetch of it every few pages. A remote buffer is planned as a single window of max_buffered_rows around the view instead. Scrolling inside it costs nothing; leaving it, or a jump, costs one fetch.

Source

pub fn source_schema(&self) -> &Arc<Schema> ⓘ

The schema of the data as loaded, before any query or reshape: what a view’s settings run on, and so what its schema rule records and matches.

Source

pub fn footers_pending(&self) -> Option<FootersJoin>

The pass that is still reading this dataset’s footers, if one is.

Source

pub fn counts_itself_later(&self) -> bool

Whether this frame’s row count is already on its way.

The frame matters: what the pass is bringing is the dataset’s count, which is not the count of a query’s result. Asking this about the wrong frame is how a count nobody else was going to take gets declined.

A staged open is still reading every footer, and those footers hold the count. Asking for it separately would read all of them a second time, so the dataset says it will have one shortly and the caller does not start a count of its own.

Source

pub fn indexing(&self) -> Option<&Arc<Lines>>

The lines being indexed behind the first rows, if they still are.

Source

pub fn lines_to_index(&self) -> Option<&Arc<Lines>>

The lines this dataset opened from in part, until it has been told they are all in, though their indexing is paused: what an indexing thread works on.

Source

pub fn row_estimate(&self, pass: Option<RowEstimate>) -> Option<RowEstimate>

The dataset’s row count from a sample of its footers, while the frame is the dataset as loaded and its count is not known. pass is the estimate of the footer pass still reading, which the dataset has not been given yet.

Source

pub fn file_row_starts(&self) -> Option<Vec<usize>>

Where each of the dataset’s files starts in the view, with the total last: while the view keeps the dataset’s rows and every file’s rows are known.

Source

pub fn files_to_count(&self) -> Option<usize>

How many files a count of the dataset reads footers of, when it reads them.

Source

pub fn numbered_by_default(&self) -> bool

Whether # is on for this dataset when the config leaves it to the format: text and logs, whose rows carry their place in the file.

Source

pub fn row_numbers_count_the_view(&self) -> bool

Whether # is on and numbers the rows by their place in the view, because the view’s rows do not carry their place in the source: a sorted or filtered view of data in a store, of many files, or too large to number.

Source

pub fn give_up_on_pending_footers(&mut self)

Give up on the rest of the footers: the pass could not read them.

The dataset stays as it opened — a working view of it, built from two footers — and stops waiting. That matters beyond the columns: while a pass is pending the dataset declines to count itself, because the pass was going to bring the count with it. One failed pass would otherwise cost it an exact row count, and its windowed reads, for the rest of the session.

Source

pub fn join_dataset_schema( &mut self, found: FootersFound, ) -> Result<(), Box<FootersFound>>

Every footer’s answer, joined to the dataset already on screen.

The open painted from the first file and the newest; this is what the rest of them say. Columns only ever join: a name the opening schema did not have goes on the end, and every name already there keeps its place — including the places a user has since moved them to — so nothing moves under the cursor except to make room for what arrived.

The frame is rebuilt rather than widened in place, because the scan itself differs: it now knows which files hold a column in a type the dataset cannot keep, and with every file’s row count it can number the rows, which is what tells an absent cell from a null.

Gives them back as Err rather than taking them, while the user is looking at something built on top of the scan instead of the scan itself — see Self::scan_is_the_root. Rebuilding the root under a query takes away the columns the query named; handing them back lets the caller keep them and offer them again when the view comes back to the data.

Source

pub fn visible_lf(&self) -> LazyFrame

The frame as the user sees it: lf without the hidden row-index column.

Everything that exports, reshapes, groups or analyses the data reads this. The buffer reads lf itself and keeps the column, which is how display_drift traces a row back to its file; it stays invisible because the display is only ever a projection of column_order, which never names it.

Source

pub fn scans_a_temp_file(&self) -> bool

Whether the frame scans a temporary file this state holds (a decompressed archive). A view captured at exit must not reference it: the file is removed when the last state holding it drops, and the plan would scan a path that no longer exists.

Source

pub fn scans_a_download(&self) -> bool

Whether the frame scans a downloaded remote file, removed when datui lets go of it; see Self::scans_a_temp_file.

Source

pub fn read_mode(&self) -> Option<ReadMode>

How the open reads the data, when an open found it; None for a frame handed in whole, such as one from Python.

Source

pub fn read_as(&self) -> Option<FileFormat>

The format the open read the data as. See OpenFacts::read_as.

Source

pub fn fetched(&self) -> bool

Whether the data was downloaded from a remote source before it was read.

Source

pub fn query_source(&self) -> LazyFrame

The frame a query, a SQL statement or a fuzzy search builds on. Never carries the drift column: a query’s rows are its own, and its schema becomes the column order, so the column would otherwise become one of the data’s.

Source

pub fn drifts(&self) -> bool

Whether rows still know which file they came from.

Source

pub fn drift_groups(&self) -> Arc<Vec<DriftGroup>> ⓘ

What each drift group is missing, for the renderer. Empty when nothing drifts.

Source

pub fn can_name_source_files(&self) -> bool

Whether an export can name each row’s file: the frame has to still carry the scan’s row index, and the dataset has to have files to name.

Source

pub fn export_frame(&self, name_files: bool) -> ExportFrame

The rows an export writes, planned and not run: the view, and when name_files asks and the dataset can, a column naming each row’s file in place of the scan’s hidden row index. Otherwise the index is dropped, so datui’s own bookkeeping never lands in the user’s file.

Source

pub fn dataset_notes(&self) -> &[Note]

What datui noticed about the dataset itself, as its footers were read.

Separate from Self::notes because this is the half that belongs to the data: a snapshot taken to roll a view back has to put back these and not the view’s, which describe a filter and sort that the rollback is undoing.

Source

pub fn notes(&self) -> Vec<Note>

What datui noticed: about the dataset when it opened, then about the view the filter and sort have made of it. Empty when there is nothing to say.

Source

pub fn not_the_table(&self) -> Option<&'static str>

The lake format whose plain files this dataset is, if it is one.

For the chip in the control bar. The note says the same at length; this is what keeps the row count from reading as the table’s.

Source

pub fn other_tables(&self) -> &[String]

The file’s other tables, as --table names them; empty for a file of one.

Source

pub fn format_read(&self) -> Option<&Arc<Read>>

What a read through a format spec found, when the dataset was read through one.

Source

pub fn delimited_read(&self) -> Option<&Arc<DelimitedRead>>

What a read through a delimited spec found, when the dataset was read through one.

Source

pub fn unit_of(&self, column: &str) -> Option<&str>

The unit of the column named column, from a delimited spec’s unit row or the file itself. A filter, sort, drill or query that keeps the loaded column, renamed or not, keeps its unit; a column a query computes has none, whatever it is called.

Source

pub fn units(&self) -> Vec<(String, String)>

Each column of the view that has a unit, with it.

Source

pub fn format_detail(&self) -> Option<&Detail>

What the file said besides its rows: its Info panel tab.

Source

pub fn has_notes(&self) -> bool

Whether datui noticed anything at all. Answers what notes() is usually asked — whether to offer the tab — without building the list to find out.

Source

pub fn notes_unseen(&self) -> bool

Whether there is something to say that has not been offered yet.

Source

pub fn notes_seen(&self) -> bool

Whether the notes have been offered. Exact, where !notes_unseen() would also be true of a dataset that has nothing to say.

Source

pub fn mark_notes_seen(&mut self)

The Info panel has been opened; the quiet accent has done its job.

Source

pub fn read_column_as_text(&mut self, column: &str) -> PolarsResult<bool>

Read column as text from every file, so the values a type conflict hid can be seen.

Rebuilds the scan rather than re-opening the dataset: everything it needs is already here. The file list, each file’s row count and — since the footers were read — the type each file holds each conflicting column in are all on hand, so this costs no directory listing, no footer read and no request. The view goes with it: a filter and sort in force are re-applied to the new frame.

Returns whether anything happened. false for a column that is not on offer, which is what the panel only ever asks about, and for one already read this way. A scan that cannot be built is kept as the error showing, and returned.

Source

pub fn read_as_text(&self) -> &[PlSmallStr]

The columns being read as text rather than as the type most rows have.

Source

pub fn dataset_schema(&self) -> Option<&DatasetSchema>

What the footers said about the dataset’s columns, when it is many files.

Source

pub fn remote_files_counter(&self) -> Option<FileCounter>

The counter for a remote dataset’s files, while its count would be the data’s: the frame is the scan as loaded, and the files have not been counted yet.

Not while a pass is already reading every footer of this dataset. That pass brings the row groups back with it, and this counter reads the same footers a second time — for a prefix of 6,541 files, 6,541 ranged reads to learn what is already on its way. Staging the open to save round trips and then spending them here would be worse than not staging it at all.

Source

pub fn files_a_page_reads(&self, start: usize, len: usize) -> Option<usize>

The frame for buffer rows [start, start + len), columns in display order. For a remote dataset whose files are counted, a scan of only the files holding them. How many of the dataset’s files a page at start would read.

A windowed remote scan reads only the files holding those rows; everything else hands the whole scan to Polars, which reads what it decides to and does not say. None is that second case — not zero, which would claim a page came from nowhere.

Source

pub fn carries_source_rows(&self) -> bool

Whether the frame’s rows carry their place in the source, for #: a dataset’s rows that know their file, or lines, while the frame is still the scan’s. A query’s rows, a reshape’s and a group’s stand for no row of the source.

Source

pub fn row_numbers_from(&self, start: usize, rows: usize) -> Vec<usize>

What # shows for rows rows from start: each row’s place in the source where the rows carry it, else its place in the view, counted from row_start_index. A pristine view’s places are the source’s either way.

Source

pub fn estimated_row_bytes(&self) -> usize

Best available in-memory width estimate for one logical row.

Data Quality uses this only for a preflight estimate and labels the result as approximate. Buffer planning uses the same source so the two surfaces do not disagree about the shape of the current view.

Source

pub fn source_file_count(&self) -> Option<usize>

Number of source files known to participate in the pristine dataset scan. Returns None after a query or reshape has broken the row-to-file mapping.

Source

pub fn at_end(&self) -> bool

True when the view already shows the last page, so End has nothing to load.

Source

pub fn wants_to_load_ahead(&self) -> bool

Whether the view is inside the buffer and within a page of one of its ends, with more data past that end: where a collect would grow the buffer, if one ran. A scroll that stays inside the buffer runs none, so the growing waited until the view had left it — and the page was blank while it happened.

Source

pub fn buffer_position(&self) -> (u64, usize, usize, usize)

Where the view and the buffer are, to tell one load-ahead attempt from the next.

Source

pub fn select_next(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn page_down(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn select_previous(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn scroll_to(&mut self, index: usize) -> bool

Returns true if a buffer collect is needed.

Source

pub fn scroll_to_row_centered(&mut self, row_index: usize) -> bool

Set scroll position for go-to-line (centered). Returns true if a collect is needed.

Source

pub fn scroll_to_start(&mut self) -> bool

Jump to the first page. Returns true if a collect is needed.

Source

pub fn scroll_to_end(&mut self) -> bool

Jump to the last page. Returns true if a collect is needed.

Source

pub fn half_page_down(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn half_page_up(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn page_up(&mut self) -> bool

Returns true if a buffer collect is needed after the scroll.

Source

pub fn scroll_right(&mut self)

Source

pub fn scroll_left(&mut self)

Source

pub fn columns_on_screen(&self) -> Option<OnScreen>

Which shown columns the table last drew, and the cursor’s: what the control bar’s column position says.

Source

pub fn scroll_columns(&mut self, mv: ColumnMove)

Move the view sideways, leaving the cursor where it is unless the view leaves it behind on the left. Planned from the widths the columns were last drawn at; reads nothing. A page that needs a column not drawn yet waits for the next draw, which measures it from the rows on hand; a relative move typed behind it waits too and lands after it, in order, so no key is lost or planned on a guess.

Source

pub fn move_cursor(&mut self, mv: CursorMove)

Move the column cursor (h l [ ] { }), the view following only when the cursor would leave the screen. Reads nothing; a move that needs a column not drawn yet waits for the next draw, in order, as Self::scroll_columns says.

Source

pub fn go_to_column(&mut self, name: &str)

Put the cursor on the shown column name and show it as g does: left where it is when already whole on screen, else first after the frozen columns, or on the last page when it is there. A frozen column is on screen already.

Source

pub fn set_current_column(&mut self, name: &str)

Put the cursor on the shown column name, scrolling as little as it takes to show it.

Source

pub fn current_column(&self) -> Option<&str>

The column cursor’s column: the one the per-column keys act on (value counts, copying a cell, the sidebar and inspector opening on it, a find in one column). The first shown column until the cursor moves; None with no columns shown.

Source

pub fn current_column_index(&self) -> Option<usize>

The cursor’s place among the shown columns, from 0, frozen ones first.

Source

pub fn headers(&self) -> Vec<String>

Source

pub fn set_column_order(&mut self, order: Vec<String>)

Source

pub fn set_locked_columns(&mut self, count: usize)

Source

pub fn locked_columns_count(&self) -> usize

Source

pub fn frozen_shown(&self) -> usize

How many columns are drawn frozen: the count asked for, or fewer while the last layout could not fit them all beside a usable scrolling column. The ones left out lead the scrolling columns, so every column stays reachable.

Source

pub fn width_choice(&self, name: &str) -> WidthChoice

How a column’s width is chosen.

Source

pub fn shown_width(&self, name: &str) -> Option<u16>

The width a column was last drawn at, if it has been drawn.

Source

pub fn on_screen_width(&self, name: &str) -> Option<u16>

The width the column takes on screen, the room it filled at the right edge included.

Source

pub fn set_width_choices( &mut self, choices: impl IntoIterator<Item = (String, WidthChoice)>, )

Set how each named column’s width is chosen. Reads nothing: a fit is taken from the rows on screen when the table is next drawn.

Source

pub fn get_filters(&self) -> &[FilterStatement]

Filters for a view: while drilled into a group these are the grouped view’s, which is what a view reproduces (it cannot express a drill-down).

Source

pub fn get_sort_columns(&self) -> &[String]

Source

pub fn get_sort_ascending(&self) -> bool

Source

pub fn get_sort_descending(&self) -> &[bool]

Source

pub fn view_filters(&self) -> &[FilterStatement]

Filters applied to the frame on screen (inside the group while drilled). This is what the Sort & Filter sidebar shows and edits.

Source

pub fn view_sort_columns(&self) -> &[String]

Source

pub fn view_sort_ascending(&self) -> bool

Source

pub fn view_sort_descending(&self) -> &[bool]

Source

pub fn header_sort(&self) -> (Vec<String>, Vec<bool>)

The header’s sort marks: the sidebar’s sort, or else the ORDER BY of the SQL in effect, while its own rows are on screen (not a group drilled into).

Source

pub fn reshaped_lf_clone(&self) -> Option<LazyFrame>

The pivot/melt result in effect, for a snapshot that may need to put it back.

Source

pub fn get_column_order(&self) -> &[String]

Source

pub fn is_at_defaults(&self) -> bool

Whether the table shows its defaults: no query, filters, sort or reshape, every column in file order, nothing locked. A view saved from this state would carry nothing — and, matching by schema, it would shadow real views in the apply gate as a well-used no-op.

Source

pub fn get_active_query(&self) -> &str

Source

pub fn get_active_sql_query(&self) -> &str

Source

pub fn check_plan(&self) -> PolarsResult<()>

Whether the rows on screen can be read at all: a sort, a filter or a column named in the layout that the frame does not have fails here. Resolves the plan and reads no rows.

Source

pub fn rollback_point(&self) -> ViewRollback

The view as it is now, to go back to if a query fails while running.

Source

pub fn roll_back(&mut self, saved: ViewRollback)

Put back the view rollback_point saved, with no error showing. Its row count and buffer come back with it, and a count of it that landed meanwhile (see ViewRollback::count_landed), so nothing is read again. Nothing is read here: a view with no rows on hand has them read by the caller’s next collect.

A checkpoint taken over data since replaced — a join of the remaining footers, a column read as text — holds frames built on data no longer loaded. Putting those back would mix two roots, so the view returns to the data as loaded instead.

Source

pub fn try_transition<T, E>( &mut self, steps: impl FnOnce(&mut Self) -> Result<T, E>, ) -> Result<(T, ViewRollback), E>

Run steps as one transition of the view: planned, never read (no collect runs while they do), starting with no error showing. If a step fails, the view before them is put back and the error returned. If they all plan, the view before them comes back with the result, for the caller to restore with Self::roll_back should reading the new view’s rows fail.

Source

pub fn deferred<R>(&mut self, steps: impl FnOnce(&mut Self) -> R) -> R

Run steps with every collect they would make left to the caller, who reads the rows off the UI thread (prepare_async_collect).

Source

pub fn count_landed( &mut self, len_generation: u64, rows: usize, file_row_groups: Option<&[Vec<usize>]>, ) -> bool

A background count of frame len_generation came back. Taken when that frame is the one on screen; returns whether it was.

Source

pub fn follow(&self) -> Option<&Follow>

The follow of the file this dataset reads, while it is followed.

Source

pub fn follow_mut(&mut self) -> Option<&mut Follow>

Source

pub fn start_following(&mut self, follow: Follow)

Follow the file this dataset reads with follow, whose watcher is running.

Source

pub fn stop_following(&mut self)

Stop following. The rows read so far stay.

Source

pub fn on_last_row(&self) -> bool

Whether the cursor is on the last row of a view whose length is known.

Source

pub fn lf(&self) -> &LazyFrame

The frame on screen: the root, then the query or reshape, the filters and the sort. Column order is applied when rows are read.

Source

pub fn into_lf(self) -> LazyFrame

Hand back the frame on screen, for a caller that built a state only to load it.

Source

pub fn schema(&self) -> &Arc<Schema> ⓘ

The schema of the frame on screen.

Source

pub fn num_rows(&self) -> usize

The rows the frame holds: exact when Self::is_num_rows_valid, else as far as the reads so far have reached.

Source

pub fn error(&self) -> Option<&PolarsError>

Why the last query, step or read failed, while it is still showing.

Source

pub fn dismiss_error(&mut self)

Stop showing the last failure. The view is as it was; only the message goes.

Source

pub fn start_row(&self) -> usize

The first row of the page on screen.

Source

pub fn partition_columns(&self) -> Option<&[String]>

The hive partition columns the dataset was loaded with.

Source

pub fn polars_streaming(&self) -> bool

Whether reads use Polars’ streaming engine.

Source

pub fn drilled_group_key(&self) -> Option<(&[String], &[String])>

The group drilled into, as its key columns and their values.

Source

pub fn sql_table_columns(&self) -> Vec<(String, DataType)>

The columns of df, the table SQL runs against, with their types. From the schema already known for the data as loaded; a drilled group or a reshape only has its plan resolved, which reads nothing.

Source

pub fn sql_table_rows(&self) -> Option<usize>

Rows df holds, when that is known without counting: the data as loaded, once its count has come back.

Source

pub fn get_active_fuzzy_query(&self) -> &str

Source

pub fn last_pivot_spec(&self) -> Option<&PivotSpec>

Source

pub fn last_melt_spec(&self) -> Option<&MeltSpec>

Source

pub fn reshape_source(&self) -> Option<&ReshapeSource>

What the pivot or melt in effect ran over. See the field.

Source

pub fn is_grouped(&self) -> bool

Whether the view is a grouping’s result (a by query, a SQL GROUP BY), so its rows drill into groups. Recorded by the query, never inferred from list columns: a table loaded with one is not grouped.

Source

pub fn group_key_columns(&self) -> Vec<String>

Source

pub fn group_value_columns(&self) -> Vec<String>

Source

pub fn binary_column_names(&self) -> HashSet<String>

Names of binary columns in the source schema. Their values are not read into the display buffer (the ‹binary› stub stands in); the renderer uses this to style those cells.

Source

pub fn buffered_memory_bytes(&self) -> Option<usize>

Estimated heap size in bytes of the currently buffered slice (locked + scrollable), if collected.

Source

pub fn buffered_rows(&self) -> usize

Number of rows currently in the buffer. 0 if no buffer loaded.

Source

pub fn display_df(&self) -> Option<&DataFrame>

Current scrollable display buffer. None until first collect().

Source

pub fn display_slice_df(&self) -> Option<DataFrame>

Visible-window slice of the display buffer (same as passed to render_dataframe).

Source

pub fn copy_row_df(&self) -> Option<DataFrame>

The selected row with every display column, raw and in display order: what a row copy carries.

Source

pub fn copy_view_df(&self) -> Option<DataFrame>

The rows on screen with every display column, raw, in display order and untouched by the column scroll: a copy that lost the columns scrolled past would deny exactly the identifiers that make the rows readable.

Source

pub fn copy_cell_value(&self, column: &str) -> Option<String>

The selected row’s value in one column, exactly as stored (see crate::exact): a float as the decimal that reads back to it, never the table’s rounded preview. A null is an empty string, like a null in an export — never the UI’s glyph. A list or struct is JSON, as in a CSV export.

Source

pub fn selected_display_row(&self) -> Option<usize>

The selected row’s number as the row-numbers column would print it.

Source

pub fn estimated_copy_bytes(&self) -> Option<usize>

Rows times estimated row width, for the copy guard: what collecting the whole view would hold, with binary at the base64 size a copy writes. None until the count has run, and while a binary column’s width is unknown: the buffer holds a stub for it, so only a footer says how wide it is.

Source

pub fn display_drift(&self, frame_rows: usize) -> Vec<u32>

The drift group of each row from the top of the view down, for a frame frame_rows tall, when the dataset’s files differ.

Sized by the frame about to be drawn rather than by visible_rows, which is what the last frame drew and is 0 before there has been one. Taking it from visible_rows left the opening frame of every drifting dataset — the one the user is looking at when nothing has been pressed yet — with no groups at all, so every absent cell fell back to the plain null glyph.

Callers pass the whole frame’s height, a header more than the rows it draws. Deliberately: the table reads this by row index and ignores what it does not reach, so a group too many costs a u32 and a group too few costs a mark.

Empty once a query or reshape has replaced the frame: those rows stand for no file, so their nulls are ordinary nulls. A frame is a screen tall, so this is a few dozen values.

Source

pub fn max_buffered_rows(&self) -> usize

Maximum buffer size in rows (0 = no limit).

Source

pub fn max_buffered_mb(&self) -> usize

Maximum buffer size in MiB (0 = no limit).

Source

pub fn can_drill_down(&self) -> bool

Whether Enter on a row drills into its group: the view is a grouped result and not already a group’s rows.

Source

pub fn inspect_fields(&self) -> Vec<InspectField>

The columns the inspector lists for a row: the table’s, in its order, then the ones hidden from it, in schema order. Never the scan’s own row index.

Source

pub fn inspect_row(&self) -> Option<InspectRow>

The selected row as the buffer holds it, with the file group that says what its nulls are. Reads nothing; None while the row is not on hand.

Source

pub fn inspect_row_at(&self, row: usize) -> Option<InspectRow>

Row row of the view as the buffer holds it, as Self::inspect_row does the selected one: Compare’s next row. None while it is not on hand.

Source

pub fn null_kind(&self, column: &str, group: Option<u32>) -> NullKind

What a null in column is, for a row of file group group: the data’s own, a file without the column, or a file holding it in another type.

Source

pub fn inspect_read_lf( &self, row: usize, columns: &[String], ) -> PolarsResult<LazyFrame>

The frame that reads columns of row row of the view: for the inspector’s fields the buffer does not hold. One row, through the same window the buffer reads, so a remote dataset reads only the file holding it. Run off this thread.

Source

pub fn drill_row(&self, group_index: usize) -> Option<DrillRow>

What drilling into the group on row group_index of the view reads, or None when the view is not grouped. The row is on screen, so the buffer holds it and nothing is computed again. A column the buffer lacks (hidden, or a binary stub) means reading the row, and one row of an aggregate is the whole aggregate, so the caller reads it off the UI thread.

Source

pub fn drill_down_into_group(&mut self, group_index: usize) -> Result<()>

Show the rows of the group on row group_index of the view, reading the row on this thread if the buffer does not hold it. The app goes through Self::drill_row instead, so that read never holds up a key.

Source

pub fn drill_down_with_row( &mut self, group_index: usize, row: &DataFrame, ) -> Result<()>

Show the rows of the group whose row group_index of the view is row, as Self::drill_row gave it. A result that holds each group as lists shows those lists as rows; one that holds only aggregates shows the source rows sharing the group’s keys, key columns first.

Source

pub fn drill_into_value( &mut self, column: &str, value: AnyValue<'static>, ) -> Result<()>

Show the rows of the view holding value in column (null matching nulls), as a drill into a group does: the breadcrumb names the value, and Esc comes back to the view. Inside a group already, it narrows that group, and Esc goes back to the view the group was drilled from.

Source

pub fn drilled_into_value(&self) -> bool

Whether the drill on screen came from Value Counts.

Source

pub fn drill_up(&mut self) -> Result<()>

Source

pub fn get_analysis_dataframe(&self) -> Result<DataFrame>

Source

pub fn get_analysis_context(&self) -> AnalysisContext

Source

pub fn plan_pivot(&self, spec: &PivotSpec) -> PivotJob

Plan a pivot of the view (long → wide). Nothing is read until the job runs. Never uses original_lf.

Source

pub fn install_pivot( &mut self, spec: &PivotSpec, pivoted: DataFrame, ) -> Result<()>

Show pivoted, the result of spec’s PivotJob, as the new pipeline root.

Source

pub fn pivot(&mut self, spec: &PivotSpec) -> Result<()>

Pivot the view here and now, reading it on this thread. The Pivot & Melt builder and views run the PivotJob in the background instead.

Source

pub fn melt(&mut self, spec: &MeltSpec) -> Result<()>

Melt the current LazyFrame (wide → long). Never uses original_lf.

Source

pub fn read_python(&self) -> &[String]

What the open did to the rows its reader gave, as Python method calls.

Source

pub fn read_notes(&self) -> &[Note]

See the field: the notes the read made, for the open to carry to the dataset.

Source

pub fn read_units(&self) -> Option<&[(String, String)]>

See the field.

Source

pub fn column_changes(&self) -> &[ColumnChange]

The view’s column types and made columns, in the order asked.

Source

pub fn retyped_columns(&self) -> Vec<String>

The columns the view gave a type: the type row draws them in the accent.

Source

pub fn type_as_read(&self, column: &str) -> Option<DataType>

column’s type before the view’s: as the read gave it, or as the view made it.

Source

pub fn values_on_screen(&self, column: &str, n: usize) -> Vec<String>

Up to n of column’s values as read that are not blank, as text: from the rows on hand, or from the first rows when the view has typed the column.

Source

pub fn column_type_of(&self, column: &str) -> Option<&ColumnType>

The type the view gives column, if it gives one.

Source

pub fn set_column_type(&mut self, column: &str, ty: Option<ColumnType>)

column as ty, or as read again with None. The view’s own type wins over what the read gave the column. Lazy: the next rows read are typed.

Source

pub fn add_made_column(&mut self, derived: Derived) -> Result<(), String>

A column made from others, as a spec’s derived column is, before the first column it is made from, which stays. Its name may not be taken.

Source

pub fn set_column_changes(&mut self, changes: &[ColumnChange]) -> Vec<String>

A saved view’s column changes, in place of the view’s own. A change whose column this data does not have is left out, with a note; the names left out are returned.

Source

pub fn python_steps(&self) -> Vec<Step>

The view as Copy as Python writes it: every step from the data as loaded to the columns shown, in their order.

Source

pub fn is_drilled_down(&self) -> bool

Source

pub fn sort(&mut self, columns: Vec<String>, ascending: bool)

Sort with one direction for every column. ascending also sets the natural order when columns is empty.

Source

pub fn sort_by(&mut self, columns: Vec<String>, descending: Vec<bool>)

Sort with a direction per column.

Source

pub fn reverse(&mut self)

Source

pub fn filter(&mut self, filters: Vec<FilterStatement>)

Source

pub fn query(&mut self, query: String)

Source

pub fn query_root(&self) -> LazyFrame

The data a query runs against: the drilled group while drilled into one, else the pivot/melt result while one is in effect, otherwise the data as loaded. Never the sidebar filters or sort, which go on top, and never a previous SQL result.

Source

pub fn sql_query(&mut self, sql: String)

Execute a SQL query against query_root (registered as table “df”): the drilled group or the reshaped data when one is in effect, otherwise the data as loaded — never the sidebar filters or a previous SQL result. Running a query starts a fresh view: install_query_result clears the sidebar filters and sort, and they are applied after it. Empty SQL resets to original state. Does not call collect(); the event loop does that via AppEvent::Collect.

Fuzzy search: filter rows where any string column matches the query. Query is split on whitespace; each token must match (in order, case-insensitive) in some string column. Empty query resets to original_lf.

Source§

impl DataTableState

Source

pub fn forget_drawn(&mut self)

Forget where the table was drawn: a frame that does not draw it leaves nothing there to click.

Source

pub fn drawn_cell(&self, x: u16, y: u16) -> Option<CellHit>

What the cell at (x, y) showed in the last frame. None off the table, or below its last row.

Source

pub fn drawn_edge(&self, x: u16, y: u16) -> Option<String>

The column whose right edge the header cell at (x, y) is: the first cell of the gap after a column’s last, where a drag resizes it.

Source

pub fn drawn_column_across(&self, x: u16) -> Option<String>

The column drawn across x, whatever the row: where a header dragged sideways is over.

Source

pub fn drawn_header(&self) -> Option<(Rect, DrawnColumns)>

The header rows as drawn and each column’s cells across, [from, to): where a header drag draws its drop mark.

Source

pub fn point_at(&mut self, hit: &CellHit) -> bool

Put the cursor on what a click landed on: the row, when the rows drawn are still the view’s, and the column. Returns whether it is there now, row and column both.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

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

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more