Skip to main content

App

Struct App 

Source
pub struct App {
Show 22 fields pub data_table_state: Option<DataTableState>, pub home_app: HomeApp, pub home: HomeState, pub info_modal: InfoModal, pub info: InfoState, pub prompt: QueryPrompt, pub input_mode: InputMode, pub overlay: Overlay, pub sort_filter_modal: SortFilterModal, pub pivot_melt_modal: PivotMeltModal, pub view_modal: ViewModal, pub analysis_modal: AnalysisModal, pub sample: SampleState, pub chart: Charts, pub export_modal: ExportModal, pub copy_modal: CopyModal, pub inspector_modal: InspectorModal, pub pickers: Pickers, pub value_counts: ValueCountsModal, pub column_forms: ColumnForms, pub hex: HexState, pub confirmation_modal: ConfirmationModal, /* private fields */
}

Fields§

§data_table_state: Option<DataTableState>§home_app: HomeApp

The home screen’s work in flight, and what it keeps for the session.

§home: HomeState

Home screen state, rebuilt whenever home is entered.

§info_modal: InfoModal§info: InfoState

What the Info panel shows of the dataset beyond its schema.

§prompt: QueryPrompt

The command line: its inputs per mode, completion, and the query it is running.

§input_mode: InputMode§overlay: Overlay

What is open over the table. See Overlay.

§sort_filter_modal: SortFilterModal§pivot_melt_modal: PivotMeltModal§view_modal: ViewModal§analysis_modal: AnalysisModal§sample: SampleState

The sample form, and what the draws learned of memory and of the paths they took.

§chart: Charts

The chart view, its export form, and the preparations it keeps or waits on.

§export_modal: ExportModal§copy_modal: CopyModal§inspector_modal: InspectorModal§pickers: Pickers

The go-to-column, format and table pickers.

§value_counts: ValueCountsModal

The Value Counts screen (F).

§column_forms: ColumnForms

The retype and combine forms.

§hex: HexState

The hex view, and the number its next read is tagged with.

§confirmation_modal: ConfirmationModal

Implementations§

Source§

impl App

Source

pub fn quality_copy_bytes(&self) -> u64

Bytes on disk in the copies kept.

Source§

impl App

Source

pub fn set_memory_probe(&mut self, probe: MemoryProbe)

Read available memory from probe instead of the system (for tests).

Source

pub fn sample_drawing(&self) -> bool

Whether the view’s sample is being drawn.

Source§

impl App

Source

pub fn python_script(&self, state: &DataTableState) -> String

The view on screen as a Python Polars script: the open’s reader, then every step that made the view. See python_script.

Source

pub fn set_clipboard_destination(&mut self, destination: Box<dyn Destination>)

Replace the clipboard destination, so tests can watch copies without a display or terminal.

Source§

impl App

Source

pub fn hex_view(&self) -> Option<&HexView>

The hex view on screen, if it is.

Source§

impl App

Source

pub fn sibling_tables(&self) -> Option<Tables>

The tables of the source on screen, from what its open holds; None for a source of one.

Source

pub fn offers_other_tables(&self) -> bool

Whether the source on screen has another table for T to open.

Source§

impl App

Source

pub fn request_reshape_preview(&mut self)

Ask for a preview of the staged spec unless already asked. One worker at a time: an edit made meanwhile is previewed when it ends.

Source

pub fn reshape_preview_pending(&self) -> bool

Whether the builder’s preview has an answer still to come.

Source§

impl App

Source

pub fn close_overlay(&mut self)

Close the overlay, dropping what it held for this opening, and go back to what it was opened over.

Source

pub fn at_table(&self) -> bool

The plain table or the query line: no overlay, and not home.

Source§

impl App

Source

pub fn pointer(&mut self, mouse: &MouseEvent, now: Instant) -> Pointer

What a mouse event means on the screen last drawn.

Source

pub fn cancel_drag(&mut self)

A key was pressed: a header being carried is put back, and its mark goes.

Source

pub fn forget_click(&mut self)

Forget the last click and any drag: it was dropped, so the next is not its second, and nothing was picked up.

Source

pub fn point(&mut self, target: &Target)

Move the cursor to what a click or the wheel landed on. A press on a header picks the column up, for a drag to move.

Source

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

Put the cursor on the cell a right click landed on, for the menu. Returns whether it is there: rows that moved since they were drawn are not the ones clicked, and the menu would act on another cell.

Source

pub fn focus_field(&mut self, id: &FieldId) -> Option<Clicked>

Focus the field a click landed on, in whichever form drew it.

Source

pub fn point_at_tool(&mut self, tool: usize)

Put the analysis tools list’s cursor on tool, the list focused, as Tab and the arrows would.

Source

pub fn start_resize(&mut self, column: String, x: u16)

Start a width drag on column, from the width it has now.

Source

pub fn set_dragged_width(&mut self, column: String, width: u16)

Set a column’s width by hand, as < and > do, within their bounds.

Source§

impl App

Source

pub fn chart_preparing(&self) -> bool

Whether chart data for the current view is being prepared: running, or waiting behind a superseded preparation still reading (unstoppable, see ChartPrep).

Source

pub fn chart_names(&self) -> Option<Vec<String>>

The series of the line or scatter chart on screen, by name, once prepared: its Y columns or its color groups.

Source

pub fn chart_data_ready(&self) -> bool

True when the chart cache holds the data for the modal’s current selection.

Source§

impl App

Source

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

The matches the prompt’s pattern has among the rows on screen, while the prompt is open.

Source

pub fn live_cells(&self) -> Option<Arc<MatchCells>>

The cells to light up: the prompt’s matches while it is open.

Source

pub fn find_hit(&self) -> Option<(usize, String)>

The cell the find in effect landed on, while the view is the one it searched.

Source

pub fn find_mark(&self) -> Option<String>

What the footer says about the find in effect: the pattern, and which match the cursor is on when that is known.

Source

pub fn finding(&self) -> bool

Whether a find is reading.

Source§

impl App

Source

pub fn home_schema(&mut self, entry: &Entry) -> Option<SchemaPreview>

Schema for a home entry, from Parquet metadata, memoized for the session. None means not knowable without a scan, and the UI says so.

Source

pub fn home_preview_rows( &mut self, entry: &Entry, screen_height: u16, ) -> Option<Arc<PreviewRows>>

A home file’s first rows for its ROWS preview, read on a worker as its open reads them. None until they land or when not previewed. screen_height sizes the page to the table’s.

Source

pub fn home_preview_pending(&self, path: &Path) -> bool

Whether entry is one the preview reads, before its rows are in.

Source

pub fn home_schema_pending(&self, path: &Path) -> bool

Whether a schema read is currently out for this path.

Source

pub fn enter_home(&mut self)

Source§

impl App

Source

pub fn enter_inspects(&self) -> bool

Whether Enter at the table opens the inspector, as Space does: a table whose rows do not drill into groups (a by view, a SQL GROUP BY), and not inside a drill-down.

Source§

impl App

Source

pub fn row_count_pending(&self) -> bool

Whether the footer’s row count is on its way, so a spinner stands in. Asked by the bar and by the run loop that turns the spinner, so they agree.

Source

pub fn count_waits_for_a_frame(&self) -> bool

Whether a paint now would start or retire the count waiting on one. A test harness, which paints nothing, asks this to know when to report a paint.

Source

pub fn frame_painted(&mut self)

A frame was painted: read the rows it needed and start the count waiting on it.

Source

pub fn unfit_count_pending(&self) -> bool

Whether the values the read’s column types made null are being counted.

Source§

impl App

Source

pub fn set_loading_phase( &mut self, phase: impl Into<String>, progress_percent: u16, )

An open is on its way: the loading screen shows phase and keys wait. Called before the event that carries the open out (by run, or a key before its Open), since a frame drawn between would show the outgoing dataset.

Source

pub fn abandon_load(&mut self)

Enter the home screen, rebuilt, with the cursor on what is open, abandoning any load. loading::Loader::retire supersedes the open’s jobs (their answers are dropped) and raises its stop flag, so downloads and cloud passes stop within a wave. Work not the open’s (an export, an analysis, the screen’s footer pass) is left running, with its progress and completion modal.

Source

pub fn route_named_paths(paths: Vec<PathBuf>, options: OpenOptions) -> AppEvent

What datui <path> does with a directory, by the same rule as Enter on its row (home::look_into_as): a hive root or a one-table directory opens as one table, any other opens home browsed into it. --hive still forces partition columns. Stats the path, so run calls it on a worker (AppEvent::OpenNamed); returns LookThenOpenDirectory or Open.

Source

pub fn route_named_paths_with( paths: Vec<PathBuf>, options: OpenOptions, formats: &Registry, ) -> AppEvent

Self::route_named_paths with the format specs: a directory a spec reads as column files opens rather than being looked at.

Source

pub fn missing_named_path( paths: &[PathBuf], formats: &Registry, ) -> Option<PathBuf>

The first named local path that is not there. URLs and globs are left to the open; stdin is no path.

Source§

impl App

Source

pub fn query_prompt_mode(&self) -> Option<QueryMode>

The command line’s language while it is open.

Source

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

The command line’s text, while it is open.

Source

pub fn query_prompt_error(&self) -> Option<String>

Why the last run failed, for the line under the input: a statement that failed while running, else one that could not be planned.

Source

pub fn inline_failures(&self) -> u64

Bumped each time a running statement’s failure is put in the prompt.

Source§

impl App

Source

pub fn create_view_from_current_state( &mut self, name: String, description: Option<String>, match_criteria: MatchCriteria, ) -> Result<SavedView>

Source§

impl App

Source§

impl App

Source

pub const LOOKING_AT_A_DIRECTORY: &'static str = "Looking at the directory"

The wait while a directory named on the command line is looked at (seconds for large Parquet).

Source

pub const LOADING_BUFFER: &'static str = "Loading buffer..."

The wait while the rows for the view are fetched.

Source

pub fn is_busy(&self) -> bool

Whether keys wait: a job the user waits on runs or is owed, an errand is between phases, or an open is on its way.

Source

pub fn task_generation(&self) -> u64

The generation background answers are judged by.

Source

pub fn job_is_current(&self, ticket: Ticket) -> bool

Whether the job ticket names is still running and its answer still wanted.

Source

pub fn use_cache(&mut self, cache: CacheManager)

Use cache from now on. For tests that read their store back: a shared one loses entries to other tests’ opens.

Source

pub fn use_catalog_dir(&mut self, dir: &Path) -> Result<()>

Read and write catalog.toml in dir, so a test’s Ctrl+D stays out of the shared config directory.

Source

pub fn open_path(&self) -> Option<&Path>

Path of the installed dataset, if any.

Source

pub fn background_work_in_flight(&self) -> bool

Whether any leased background work, current or abandoned, has yet to report.

Source

pub fn screen_generation(&self) -> u64

See the screen_generation field.

Source

pub fn modal_showing(&self) -> bool

True while a message is in front of the user that has to be dismissed.

Source

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

The follow of the dataset on screen, while it is followed.

Source

pub fn recording(&self) -> Option<&Arc<Spool>>

Standard input being recorded to the --tee file, for the dataset on screen.

Source

pub fn recording_after_exit(&mut self) -> Option<(Tee, Arc<SpoolHandle>)>

The recording to wait for after the terminal is handed back.

Source

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

The completion flash on the footer, if one is showing.

Source

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

The error dialog’s message, if one is showing.

Source

pub fn next_deadline(&self) -> Option<Instant>

When the screen next changes with no event (a flash expiring): the loop sleeps until then at most.

Source

pub fn tick_follow_clock(&mut self) -> bool

Whether the follow chip’s clock reads differently now: the frame must redraw.

Source

pub fn tick_flash(&mut self) -> bool

Drop an expired flash. Returns true when the frame must redraw.

Source

pub fn flash_polars_warning(&mut self) -> bool

Flash the next Polars user warning once per session when the bar is free. True when the frame must redraw.

Source

pub fn flash_background_panic(&mut self) -> bool

Flash a background thread panic nothing else reported (a job’s panic ends the job). True when the frame must redraw.

Source

pub fn set_input_dropped(&mut self, dropped: bool)

See the input_dropped field.

Source

pub fn hard_escape_while_busy(&self, key: &KeyEvent) -> bool

Escapes that act at once while busy and jump the queue: Ctrl-Q and Ctrl-C quit, Ctrl-O goes home, confirmation modals keep their keys, and the home screen (never busy on its own account) keeps every key.

Source

pub fn key_acts_while_busy(&self, key: &KeyEvent) -> bool

Whether a key may act while busy; the main loop adds “nothing queued” for the second group. The hard escapes always qualify. At the plain table view, keys that read nothing act too: quit, help, and the column cursor (which re-slices the held buffer, never collects; a count here would read cloud metadata on this thread, see a_key_that_acts_while_busy_reads_nothing). Everything else is type-ahead and waits. Never by keycode alone: the h in /hello never scrolls.

Source

pub fn in_normal_table_view(&self) -> bool

The plain table view: Normal mode with nothing drawn over it.

Source

pub fn open_context_menu(&mut self, at: Position)

Open the context menu at at, over the cell the cursor was just put on.

Source

pub fn close_context_menu(&mut self)

Close the context menu, if it is open.

Source

pub fn choose_from_menu(&mut self, i: usize) -> Option<AppEvent>

Choose line i of the open menu: it closes and its key is offered as typed.

Source

pub fn drop_column(&mut self, column: &str, onto: &str) -> Option<AppEvent>

A header dropped on another column: column moves to onto, as repeated H / L would. Frozen columns move among the frozen, scrolling among the scrolling.

Source

pub fn text_field_focused(&self) -> bool

Whether a text field owns typed characters, so the wheel and ? leave it alone. The home filter is excluded on purpose.

Source

pub fn something_is_spinning(&self) -> bool

Whether a spinner is on screen, so the run loop turns it and redraws.

Source

pub fn frame_work(&mut self)

A frame’s work without painting it, in the order EventPump::run does it around a frame: ask for what the frame needs, take in what arrived (as drawing does), and ask again for what that changed. For a harness with no terminal, at the point the run loop would draw: once the events on hand are handled.

Source

pub fn footer_progress(&self) -> &Arc<FooterProgress> ⓘ

The footer counter: the open’s while one is on its way, else the dataset’s. Each open counts on its own, so a replaced one cannot count under another’s name.

Source

pub fn exit_sweep(&self) -> ExitSweep

Held past the app: when dropped it removes temp files the app’s opens were still writing, giving workers up to a second to stop.

Source

pub fn spawn_async_collect(&mut self, status: &str) -> bool

Spawn a buffer collect if needed; true if a job was spawned. Advances the generation, invalidating any prior collect. An unknown row count is computed in the background (BackgroundLenReady) and never gates the paint: the plan is then a top-of-data window.

Source

pub fn new(events: Sender<AppEvent>, runtime: Handle) -> App

Source

pub fn new_with_theme( events: Sender<AppEvent>, runtime: Handle, theme: Theme, ) -> App

Source

pub fn new_with_config( events: Sender<AppEvent>, runtime: Handle, theme: Theme, app_config: AppConfig, ) -> App

An app with its saved views read here, before it is returned.

Source

pub fn new_with_views( events: Sender<AppEvent>, runtime: Handle, theme: Theme, app_config: AppConfig, view_manager: Views, ) -> App

An app whose saved views may still be on their way (Views).

Source

pub fn set_formats(&mut self, registry: Registry)

Use registry as the format specs on the search path.

Source

pub fn enable_debug(&mut self)

Source

pub fn request_what_the_frame_needs(&mut self)

After a frame, ask for what it lacked: counts for the rows on screen with none, and kinds for rows nothing has looked into. Workers read; this thread decides.

Source§

impl App

Source

pub fn help_visible(&self) -> bool

Whether the help overlay is on screen.

Source

pub fn help_context(&self) -> Option<Context>

The screen the help overlay shows the keys of, while it is up.

Source

pub fn keys_context(&self) -> Context

The screen the keys typed now go to, as the key registry names it.

Source

pub fn awaiting_open_confirmation(&self) -> bool

True while the confirmation modal asks whether to download a remote file or read a large one whole. These can be walked away from (to home, not exit): the size probe behind them can take seconds.

Source

pub fn handle(&mut self, event: AppEvent) -> EventOutcome

Handle one event. A key arriving while busy is neither acted on nor dropped: it returns as Err(key) for the caller to hold until idle, as app::event_pump::EventPump does. App::event is for callers with nowhere to hold a key.

Source

pub fn event(&mut self, event: AppEvent) -> Option<AppEvent>

Source

pub fn header_toggle_offered(&self) -> bool

Whether the dataset is delimited text, whose header H on Info’s Schema tab toggles.

Source§

impl App

Source

pub fn file_facts(&self) -> Option<&FileFacts>

What the Info panel knows about the open file: None until asked, and for a source with no local file. Cleared on install.

Source

pub fn follow_terminal_background(&mut self, mode: ThemeMode)

Under theme.mode = "auto", switch to theme.dark or theme.light for the terminal’s background, with theme.colors over it. An explicit mode ignores the terminal.

Source

pub fn settle_first_palette(&mut self, answered: Option<ThemeMode>)

Settle the first frame’s palette under auto without waiting: answered if given, else this terminal’s last answer. A later answer switches if it differs.

Source

pub fn take_background_query(&mut self) -> bool

Whether the run loop should ask the terminal’s background, once (set by AppEvent::TerminalFocused under auto).

Source

pub fn take_repaint(&mut self) -> bool

Whether the next frame repaints every cell (after a resize, or when the terminal regains focus), for the run loop.

Source

pub fn theme(&self) -> &Theme

The colors the next frame is drawn with.

Source

pub fn follows_terminal(&self) -> bool

Whether the palette follows the terminal (theme.mode = "auto").

Source

pub fn take_external_open(&mut self) -> Option<ExternalOpen>

The value the inspector wrote for another program, for the run loop.

Source

pub fn mouse_enabled(&self) -> bool

Whether the session reports the mouse, to retake it after a program had the terminal.

Source

pub fn external_opened(&mut self, open: &ExternalOpen, failed: Option<String>)

The run loop opened open: a waiting program is done with its file; a failure goes on the bar.

Source§

impl App

Source

pub fn capture_view(&self) -> Result<Option<LazyFrame>>

The view returned on exit to a caller that asked (datui.view(..., capture=True)): the committed frame without internal columns; None with no dataset. Refused when the frame scans a temp file (download, decompressed or converted copy), which is removed on exit; export (e) is the way out.

Trait Implementations§

Source§

impl Drop for App

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Widget for &mut App

Source§

fn render(self, area: Rect, buf: &mut Buffer)

Draws the current state of the widget in the given buffer. That is the only method required to implement a custom widget.

Auto Trait Implementations§

§

impl !Freeze for App

§

impl !RefUnwindSafe for App

§

impl !Send for App

§

impl !Sync for App

§

impl !UnwindSafe for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

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