Skip to main content

HomeState

Struct HomeState 

Source
pub struct HomeState {
Show 49 fields pub sections: Vec<Section>, pub filter: String, pub filter_selected: bool, pub search_limit: usize, pub hide_unreadable: bool, pub formats: Arc<Registry>, pub lake_here: Option<(PathBuf, &'static str)>, pub selected: usize, pub scroll: usize, pub view_height: usize, pub path_input_active: bool, pub path_input: String, pub path_listing: Option<PathListing>, pub path_pick: Option<usize>, pub browsing: Option<PathBuf>, pub browse_start: Option<PathBuf>, pub status: Option<String>, pub network_check: fn(&Path) -> bool, pub visits: HashMap<PathBuf, Visits>, pub newest_recent: Option<PathBuf>, pub probes: Probes, pub narrowed: Option<Narrowed>, pub cloud_kinds: HashMap<PathBuf, (EntryKind, Holds)>, pub sort: SortMode, pub listing_in_flight: bool, pub measure_in_flight: bool, pub classify_in_flight: bool, pub peeking: HashSet<PathBuf>, pub peek_failed: HashSet<PathBuf>, pub enriched: HashMap<PathBuf, Measured>, pub unapplied: HashSet<PathBuf>, pub folds: HashMap<String, bool>, pub folds_owed: bool, pub search: SearchState, pub known: HashMap<PathBuf, DatasetFacts>, pub cloud: Vec<CloudSource>, pub catalogs: Vec<ShownCatalog>, pub sized: HashSet<PathBuf>, pub web_gone: HashMap<PathBuf, HttpGone>, pub missing: HashSet<PathBuf>, pub waiting_since: Option<Instant>, pub recent_expanded: bool, pub shown_whole: HashSet<PathBuf>, pub trail: Vec<Mark>, pub returning: Option<RowKey>, pub returning_line: Option<usize>, pub landing: bool, pub rows_cache: RowsCache, pub catalog_places: CatalogPlaces,
}
Expand description

Home screen state.

Fields§

§sections: Vec<Section>§filter: String

Fuzzy filter over every row in every section.

§filter_selected: bool

The filter kept from before a dataset opened, shown selected: the next character replaces it and ~ opens the path prompt. Any other key keeps it.

§search_limit: usize

The most search matches listed under Found: [home.search] max_results.

§hide_unreadable: bool

Hide files datui has no reader for (default); Ctrl+A flips it.

§formats: Arc<Registry>

The format specs on the search path: files one names by glob list as data under its name.

§lake_here: Option<(PathBuf, &'static str)>

The lake table being browsed and its format, said on its heading for the whole browse.

§selected: usize

Index into the flattened list of currently visible rows.

§scroll: usize

First row of the last frame, as an index into HomeState::visible. Written by the renderer (which knows the list’s height) and read by HomeState::unclassified_visible, so what is looked into is what is on screen. Zero until the first frame.

§view_height: usize

How many rows the last frame had room for. See HomeState::scroll.

§path_input_active: bool

True while the user is typing a path directly.

§path_input: String§path_listing: Option<PathListing>

What the ~ prompt lists: the directory being typed and the names in it.

§path_pick: Option<usize>

The name ↑↓ put the cursor on, among those the last segment matches.

§browsing: Option<PathBuf>

Directory the user has descended into, if any. None means the root listing.

§browse_start: Option<PathBuf>

Where the browse began (entered from the root listing or jumped to). Esc climbs back to here, then to the listing, never above. None: browsing is the start.

§status: Option<String>

Transient message (e.g. a path that does not exist).

§network_check: fn(&Path) -> bool

How a path is judged network-backed; swappable so the never-touch-remote rule is testable without a remote.

§visits: HashMap<PathBuf, Visits>

How often and how lately each recent was opened, ranking matches. Set with HomeState::set_visits, which relists.

§newest_recent: Option<PathBuf>

The recent opened last: the cursor lands here, one Enter from the last file.

§probes: Probes

Where the listing of each network root and remote directory is.

§narrowed: Option<Narrowed>

The names a filter asked the server for, in a cloud directory cut short.

§cloud_kinds: HashMap<PathBuf, (EntryKind, Holds)>

What peeked cloud directories hold (hive, multi), kept for the session so each is peeked once.

§sort: SortMode

How rows are ordered inside each section.

§listing_in_flight: bool

A listing is being built on a worker; the previous one stays on screen.

§measure_in_flight: bool

True while a measurement batch is out, so only one is in flight at a time.

§classify_in_flight: bool

A classification batch is out. One at a time, each chosen from the viewport then, so fast paging does not queue every row it passed.

§peeking: HashSet<PathBuf>

Cloud directories with a peek out, kept apart from Self::cloud_kinds so no answer is claimed before the request returns.

§peek_failed: HashSet<PathBuf>

Cloud directories whose peek failed: not asked again until Ctrl+R, labeled ? (not dir, which would claim no data inside).

§enriched: HashMap<PathBuf, Measured>

Row and column counts already read, by path, so each dataset is measured once a session.

§unapplied: HashSet<PathBuf>

Paths recorded in enriched since the rows last took them in.

§folds: HashMap<String, bool>

Sections folded (true) or opened by the user, by title so it survives rebuilds that renumber sections, and cached across restarts. Unlisted sections take their default. Use HomeState::toggle_collapsed and HomeState::set_collapsed.

§folds_owed: bool

The saved folds are to be read again with the next listing, arriving with the rows they fold.

§search: SearchState

Datasets found by walking below the working directory.

§known: HashMap<PathBuf, DatasetFacts>

What earlier runs measured, by path: the index the listing was annotated from, kept so search results fill in the same way (the filter matches columns).

§cloud: Vec<CloudSource>

Cloud sources found on this machine or in the config, with their buckets. Empty without cloud credentials, which is normal.

§catalogs: Vec<ShownCatalog>

The catalogs shown, a section each. Set with HomeState::set_catalogs, which indexes their places.

§sized: HashSet<PathBuf>

HTTP(S) catalog files whose size was asked for this session (a HEAD).

§web_gone: HashMap<PathBuf, HttpGone>

HTTP(S) catalog files a HEAD showed unavailable (missing, no server); retried on Ctrl+R.

§missing: HashSet<PathBuf>

Local datasets of a catalog that the last listing found missing.

§waiting_since: Option<Instant>

When the current wait for a remote listing began, for the elapsed time on screen.

§recent_expanded: bool

RECENT shows every place, for the session: Enter on its … N more row.

§shown_whole: HashSet<PathBuf>

Directory sections shown whole rather than cut, by directory, for the session. See HomeState::show_all.

§trail: Vec<Mark>

The listings entered from, outermost first, to restore the cursor on the way out. See HomeState::leave_mark.

§returning: Option<RowKey>

The row the cursor returns to once the returned-to listing lands; held across listings while rows arrive, dropped when the user moves.

§returning_line: Option<usize>

How far down the returned-to row was, so it comes back on the same line.

§landing: bool

The cursor is where HomeState::select_first_entry put it and has not moved: a door the footers later turn down sends it to the first row.

§rows_cache: RowsCache

The rows as last listed. See RowsCache.

§catalog_places: CatalogPlaces

The catalogs’ places. See HomeState::set_catalogs.

Implementations§

Source§

impl HomeState

Source

pub const SEARCH_SECTION: &'static str = "Found"

Title of the section of recursive search results; fold state is keyed by title.

Source

pub const CLOUD_SECTION: &'static str = "Cloud"

Title of the section listing cloud sources.

Source

pub const RECENT_SECTION: &'static str = "Recent"

Title of the section listing what has been opened, grouped by place.

Source

pub fn roots(desktop_dirs: &[PathBuf]) -> Vec<Root>

Roots from the working directory, then the desktop’s data directories; duplicates collapse to the first. Recents’ places are RECENT rows, not roots.

Source

pub fn roots_with( desktop_dirs: &[PathBuf], is_network: fn(&Path) -> bool, ) -> Vec<Root>

As HomeState::roots, with the network test injected.

Source

pub fn rebuild(&mut self, recents: &[PathBuf])

Build the home listing: recents first (on a mount, the dataset you want was usually opened before), then roots scanned one level deep.

Source

pub fn rebuild_with(&mut self, recents: &[PathBuf], desktop_dirs: &[PathBuf])

As HomeState::rebuild, plus directories derived from the desktop’s own recently-used list.

Source

pub fn apply_listing(&mut self, listing: Listing)

Install a listing built elsewhere, keeping the cursor on whatever it was on.

Source

pub fn leave_mark(&mut self)

Remember the cursor before going inside something, so leaving returns to it. Call before browsing changes.

Source

pub fn come_back(&mut self, from: Option<PathBuf>)

Return to the place now browsed, from from: its filter, search, and the cursor on its row once the listing lands. Call after browsing is set. A place never entered from (Backspace above the browse start) puts the cursor on the place just left.

Source

pub fn selected_key(&self) -> Option<RowKey>

What the cursor is on, as something that survives the rows changing.

Source

pub fn reselect(&mut self, key: Option<RowKey>) -> bool

Put the cursor back on the row key names, if still listed; true if placed. A row the cap now hides counts as placed on its more row. Otherwise the cursor is clamped so it never sits past the end.

Source

pub fn set_view_height(&mut self, height: usize)

Tell the listing the list’s height, keeping the cursor on its row: RECENT’s cap is a share of the height. Called every frame; only a change does work.

Source

pub fn is_collapsed(&self, section: usize) -> bool

Whether a section is collapsed.

Source

pub fn toggle_collapsed(&mut self, section: usize)

Collapse or expand a section.

Source

pub fn set_collapsed(&mut self, section: usize, collapsed: bool)

Fold or unfold section, remembered by title. Nothing is remembered while browsing: the browsed listing never folds, and its path is also a root section’s title.

Source

pub fn jump_section(&mut self, delta: isize)

Move the cursor to the next (delta > 0) or previous section header, wrapping.

Source

pub fn has_any_dataset(&self) -> bool

Whether the listing holds anywhere to go, folded or not: datasets, lake tables (not readable as tables, but places), and rows not yet looked into, which may be datasets. Hence EntryKind::is_dataset, not EntryKind::is_known_dataset.

Source

pub fn cloud_source_of(&self, path: &Path) -> Option<&CloudSource>

The source a place belongs to: cloud://<id> itself, a bucket named with a source (s3://<id>@bucket), or a bucket some source listed.

Source

pub fn parent_of(&self, path: &Path) -> Option<PathBuf>

One level up from path. A bucket’s parent is its source, so Backspace from a bucket returns to the source.

Source

pub fn catalog_dataset( &self, path: &Path, ) -> Option<(&ShownCatalog, &ShownDataset)>

The catalog dataset listed at path itself.

Source

pub fn bookmark(&self, path: &Path) -> Option<(&ShownDataset, &str)>

The dataset a bookmark is listed under, and the bookmark’s name.

Source

pub fn size_hint(&self, path: &Path) -> Option<u64>

What a catalog says an unmeasured HTTP(S) file weighs, shown as ~33 MB.

Source

pub fn cloud_look(&self, entry: &Entry) -> Option<CloudLook>

How far an object-store directory is in being looked into, while its row has no label. None once labeled, or for other rows.

Source

pub fn place_kind(&self, path: &Path) -> Option<&'static str>

What a source or catalog calls a place: a catalog’s remote dataset, or missing for an absent local one.

Source

pub fn place_details(&self, path: &Path) -> Option<&[(String, String)]>

Details-pane lines for a place a cloud source listed or a catalog names, when it has any.

Source

pub fn location_label(&self, path: &Path) -> String

The location as the title bar names it; cloud places read as a trail through the source’s label.

Source

pub fn sync_search_section(&mut self)

Put the search results into sections, or take them out, after every rebuild and batch. Only while there is a filter: unfiltered, everything matches.

Source

pub fn search_batch(&mut self, root: &Path, found: Vec<Entry>, scanned: usize)

Fold a batch of search results in, keeping the list free of duplicates.

Source

pub fn score_job(&mut self) -> Option<ScoreJob>

The scoring a worker should do next, if owed (the filter changed, or files arrived). One at a time; the next is asked when it answers.

Source

pub fn search_scored(&mut self, epoch: u64, scored: Matches)

A worker’s scoring is in.

Source

pub fn search_finished( &mut self, root: &Path, scanned: usize, limited: Option<String>, )

Record that the walk under root has finished.

Source

pub fn visible(&self) -> Vec<Row<'_>>

Lines on screen: a header per non-empty section, then its matching rows unless folded. Results stay grouped while filtering, to show where a dataset lives.

Source

pub fn header_rows(&self) -> Vec<bool>

Which rows of HomeState::visible are headers, without building the rows.

Source

pub fn matched(&self) -> usize

How many rows the filter matches: the sum of the section headers’ counts.

Source

pub fn row_count(&self) -> usize

How many rows HomeState::visible lists.

Source

pub fn row_at(&self, index: usize) -> Option<Row<'_>>

Row index of HomeState::visible.

Source

pub fn rows_built(&self) -> usize

How many times the rows were built, for the test that a frame builds them at most once.

Source

pub fn set_catalogs(&mut self, catalogs: Vec<ShownCatalog>)

Show these catalogs.

Source

pub fn set_visits(&mut self, visits: HashMap<PathBuf, Visits>)

How often and how lately each recent was opened, which ranks matches.

Source

pub fn show_all(&mut self, section: usize)

Show the whole of the section the more row at section cuts.

Source

pub fn cut_again(&mut self, section: usize) -> bool

With the cursor on a row the cut would hide in a section shown whole, cut it back, the cursor on the row standing for the rest. Whether it did.

Source

pub fn sections_mut(&mut self) -> &mut Vec<Section>

The sections, to change in place; rows are relisted on the next read.

Source

pub fn path_candidates(&self) -> Vec<&PathName>

The names the ~ prompt offers: those in the typed directory matching its last segment, best first; hidden names only after a typed dot.

Source

pub fn pick_first_path(&mut self)

Put the ~ prompt’s pick on the first match, or none, so the list always shows what Enter and Tab take. ↑ from the first takes the typed path as is.

Source

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

The path the picked candidate names, with its separator when it is a directory.

Source

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

What Tab makes of the typed path: the sole candidate, or the candidates’ longest common start. None when it adds nothing.

Source

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

Every URL the screen knows (catalogs, buckets, listings, the index): what s3:// completes from.

Source

pub fn selected_row(&self) -> Option<Row<'_>>

The highlighted row, whatever it is.

Source

pub fn selected_entry(&self) -> Option<&Entry>

The highlighted row when it is a dataset, door included (it can be opened; it is Row::Door only to stay out of path-keyed maps).

Source

pub fn selection_is_the_door(&self) -> bool

Whether the cursor is on the door rather than on something in the directory.

Source

pub fn recents_in(&self, place: &Path) -> Vec<PathBuf>

The recents that live in place: what Delete on its row forgets.

Source

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

The section the highlighted row belongs to.

Source

pub fn selected_catalog(&self) -> Option<&ShownCatalog>

The catalog whose section heading is selected, if the selection is one.

Source

pub fn selection_is_header(&self) -> bool

Whether the highlighted row is a section header.

Source

pub fn pending_probes(&self) -> Vec<PathBuf>

Remote roots that have neither answered nor been written off, for the caller to probe off the UI thread.

Source

pub fn below_browse_start(&self) -> bool

Whether the browsed directory is below the browse start, so Esc has a level to climb before the listing.

Source

pub fn sections_waiting(&self) -> bool

Whether any section on screen is still waiting for its rows.

Source

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

The remote location being browsed, while its listing has not come back.

Source

pub fn probe_ready(&mut self, root: PathBuf, rows: Vec<Entry>, cut_short: bool)

Record what a probe found. An empty listing is still an answer.

Source

pub fn apply_cloud_kinds(&mut self, root: &Path)

Label the rows of a cloud listing with what peeking inside them found.

Source

pub fn cloud_directories_to_peek(&self, limit: usize) -> Vec<PathBuf>

Cloud directories on or near the screen not yet peeked into, at most limit, the highlighted first. The cloud twin of Self::unclassified_visible: a peek is a request, worth spending on rows someone is looking at.

Source

pub fn probe_failed(&mut self, root: PathBuf, why: Option<String>)

Record that a probe could not read the root, and why when the service said.

Source

pub fn measure_now(&mut self, limit: usize) -> bool

Measure a batch of rows on the calling thread, for tests and library callers with safe paths. The app never calls this: footer reads can block, so the UI thread only picks rows (HomeState::unmeasured_visible) and a worker reads.

Source

pub fn unmeasured_visible(&self, limit: usize) -> Vec<Entry>

Rows not yet measured, up to limit: those on or near the screen first (see HomeState::entries_near_cursor), so what is shown is measured before the rest; then the rest of the rows listed, from the top, so a column name matches any of them; sorted by rows, then the rows a cut hides.

Source

pub fn classify_now(&mut self, limit: usize) -> bool

Look into a batch of rows on the calling thread; for tests and library callers, like HomeState::measure_now.

Source

pub fn unclassified_visible(&self, limit: usize) -> Vec<Entry>

Rows on or near the screen not yet looked into, up to limit. Unlike HomeState::unmeasured_visible, which walks from the top, this asks the viewport plus a screen either side (thousands of partitions would take seconds to reach the cursor): the highlighted row first (about to be acted on), then the screen, the screen below, the screen above.

Source

pub fn record_measurement(&mut self, path: PathBuf, measured: Measured)

Record what measuring path found, for HomeState::apply_new_measurements to fold into its rows.

Source

pub fn record_size(&mut self, path: PathBuf, measured: Measured)

Record a size alone: a measurement that landed meanwhile keeps the rest.

Source

pub fn apply_measurements(&mut self)

Fold every known measurement into the rows currently listed, as a new listing needs.

Source

pub fn apply_new_measurements(&mut self)

Fold the measurements recorded since the last fold into their rows. Only those rows change and are scored again: measurements land a file at a time while the user types, over listings of thousands.

Source

pub fn select_first_entry(&mut self)

Put the cursor on the first dataset rather than the first header, so the preview pane has something to show without a keypress.

Inside a directory that is the door when the door opens the directory as one dataset (see door_lands), and the first thing in it otherwise.

Source

pub fn clamp_selection(&mut self)

Source

pub fn select(&mut self, index: usize)

Put the selection on row index of what is listed, as a click does.

Source

pub fn move_selection(&mut self, delta: isize)

Source

pub fn page_selection(&mut self, delta: isize)

Move the selection delta rows, stopping at the ends rather than wrapping (a wrapped page jump lands somewhere unexpected; single steps wrap).

Trait Implementations§

Source§

impl Debug for HomeState

Source§

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

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

impl Default for HomeState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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