pub struct HomeState {Show 53 fields
pub sections: Vec<Section>,
pub filter: String,
pub filter_selected: bool,
pub search_limit: usize,
pub found_scores: Option<(String, Vec<i32>)>,
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 probed: HashMap<PathBuf, Vec<Entry>>,
pub unreachable: HashSet<PathBuf>,
pub listing_so_far: HashMap<PathBuf, Vec<Entry>>,
pub cut_short: HashSet<PathBuf>,
pub narrowed: Option<Narrowed>,
pub probe_errors: HashMap<PathBuf, String>,
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 pending_enrich: bool,
pub pending_classify: bool,
pub pending_peek: bool,
pub peeking: HashSet<PathBuf>,
pub peek_failed: HashSet<PathBuf>,
pub enriched: HashMap<PathBuf, Measured>,
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 trail: Vec<Mark>,
pub returning: Option<RowKey>,
pub returning_line: Option<usize>,
pub landing: bool,
}Expand description
Home screen state.
Fields§
§sections: Vec<Section>§filter: StringFuzzy filter over every row in every section.
filter_selected: boolThe filter kept from before a dataset was opened, shown selected: the next
character typed replaces it, and ~ opens the path prompt, rather than both
adding to a search that is done. Any other key keeps it.
search_limit: usizeThe most search matches listed under Found: [home.search] max_results.
found_scores: Option<(String, Vec<i32>)>The filter Found’s rows were scored for, and the score of each of its first
rows, in order. Listing a thousand matches scored each of them again on every
pass over the rows, several per frame.
hide_unreadable: boolLeave out files datui has no reader for. Ctrl+A flips it; they are hidden by
default.
formats: Arc<Registry>The format specs on the search path: a file one of them names by its glob is listed as data, under the spec’s name.
lake_here: Option<(PathBuf, &'static str)>The lake table being browsed, and its format. Said on its heading for as long as the browse lasts, since it is a fact about the directory rather than an event.
selected: usizeIndex into the flattened list of currently visible rows.
scroll: usizeFirst row of the last frame drawn, as an index into HomeState::visible.
Written by the renderer, which is the only place that knows how tall the list
is, and read by HomeState::unclassified_visible so that what gets looked
into is what is being looked at. Zero until a frame has been drawn, which is
the list scrolled to the top and so a safe place to start.
view_height: usizeHow many rows the last frame had room for. See HomeState::scroll.
path_input_active: boolTrue 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 current browse began: the directory entered from the root listing or
jumped to by path. Esc climbs back to here and then to the listing, so it never
wanders above the place the user started from. None treats browsing itself
as the start.
status: Option<String>Transient message (e.g. a path that does not exist).
network_check: fn(&Path) -> boolHow a path is judged to be network-backed. Swappable so the “never touch a remote path on this thread” rule can be tested without a remote.
visits: HashMap<PathBuf, Visits>How often and how lately each recent was opened: ranks matches (#547 M9).
newest_recent: Option<PathBuf>The recent opened last. Recent is ranked by frecency, and the cursor lands here so the last file is still one Enter away.
probed: HashMap<PathBuf, Vec<Entry>>Network roots whose listing has come back, keyed by path.
unreachable: HashSet<PathBuf>Network roots that did not answer.
listing_so_far: HashMap<PathBuf, Vec<Entry>>The rows of network directories still being listed, read so far.
cut_short: HashSet<PathBuf>Network directories whose listing stopped at discover::MAX_ENTRIES_PER_DIR.
narrowed: Option<Narrowed>The names a filter asked the server for, in a cloud directory cut short.
probe_errors: HashMap<PathBuf, String>Why a cloud listing was refused, when the service said.
cloud_kinds: HashMap<PathBuf, (EntryKind, Holds)>What cloud directories turned out to hold when peeked into: hive or multi.
Kept for the session, so a directory is peeked at once however often it is listed.
sort: SortModeHow rows are ordered inside each section.
listing_in_flight: boolTrue while a listing is being built on a worker. The previous listing stays on screen meanwhile, so a refresh never blanks the view.
measure_in_flight: boolTrue while a measurement batch is out, so only one is in flight at a time.
classify_in_flight: boolTrue while a classification batch is out. One at a time, and the next batch is chosen from the viewport as it is then — which is what keeps paging quickly from queueing a classification for every row it passed over.
pending_enrich: boolSet while rows on screen are still unmeasured, so the main loop knows to draw another frame and measure the next batch.
pending_classify: boolThe same, for rows on screen nothing has looked into yet.
pending_peek: boolThe same, for cloud directories on screen nothing has peeked into yet.
peeking: HashSet<PathBuf>Cloud directories with a peek out. Their own set rather than a claim written into
Self::cloud_kinds: a claim is an answer, and writing one before the request
comes back put dir on a row that had a count and staked “never again this
session” on a request that might fail.
peek_failed: HashSet<PathBuf>Cloud directories whose peek failed: not asked again until Ctrl+R, and labelled
? rather than dir, which would claim there is no data inside.
enriched: HashMap<PathBuf, Measured>Row and column counts already read, keyed by path. Reading a Parquet footer is cheap; reading several hundred of them is not, so results are kept for the session and each dataset is measured once.
folds: HashMap<String, bool>Sections the user has folded or opened, by title, true meaning folded. A
section not listed here takes its own default. Keyed by title rather than
index so the state survives a rebuild, which reorders and renumbers sections,
and kept in the cache so it survives a restart. Use
HomeState::toggle_collapsed and HomeState::set_collapsed rather than
touching this directly.
folds_owed: boolThe saved folds are to be read again, with the next listing: entering the home screen asks for them, and they arrive with the rows they fold.
search: SearchStateDatasets found by walking below the working directory.
known: HashMap<PathBuf, DatasetFacts>What datui measured on previous runs, keyed by path — the same index the listing was annotated from, kept here so rows the recursive search finds can be filled in the same way (columns are what the filter matches on).
cloud: Vec<CloudSource>Cloud sources discovered on this machine or named in the config, with their buckets. Empty on a machine with no cloud credentials, which is the common case and not a failure.
catalogs: Vec<ShownCatalog>The catalogs shown, each a section of its own.
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 that HEAD settled cannot be had: not there, or no server answered. Asked again 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: boolRECENT shows every place, however many rows that takes. Set by Enter on the
… N more row, for the session.
trail: Vec<Mark>The listings the user went inside from, outermost first: where to put the
cursor back on the way out. See HomeState::leave_mark.
returning: Option<RowKey>The row the cursor goes back to once the listing being returned to lands. Held across listings while rows are still arriving, since the row may not be in the first one; dropped as soon as the user moves the cursor.
returning_line: Option<usize>How far down the list the row being returned to was when the user left it, so it comes back on the same line rather than wherever the scroll falls.
landing: boolThe cursor is where HomeState::select_first_entry put it, and the user has not
moved it since: a door the footers turn down afterwards takes it to the first row.
Implementations§
Source§impl HomeState
impl HomeState
Sourcepub const SEARCH_SECTION: &'static str = "Found"
pub const SEARCH_SECTION: &'static str = "Found"
Lines currently on screen: a header per non-empty section, followed by its matching rows unless it is collapsed.
Results stay grouped even while filtering. Ranking them across sections would read better as a hit list, but it costs the one thing the grouping is for — seeing where a dataset lives — and a name on its own rarely says that. Title of the section holding recursive search results.
A constant because collapse state is keyed by title, and because the renderer and the tests both need to name it.
Sourcepub const CLOUD_SECTION: &'static str = "Cloud"
pub const CLOUD_SECTION: &'static str = "Cloud"
Title of the section listing cloud sources.
Sourcepub const RECENT_SECTION: &'static str = "Recent"
pub const RECENT_SECTION: &'static str = "Recent"
Title of the section listing what has been opened, grouped by place.
Sourcepub fn roots(desktop_dirs: &[PathBuf]) -> Vec<Root>
pub fn roots(desktop_dirs: &[PathBuf]) -> Vec<Root>
Gather roots from the working directory and the desktop.
Where you are first, then the directories the desktop says you have opened data
from. Duplicates collapse to the first. Recents do not make roots: the place a
recent lives in is a row of RECENT.
Sourcepub fn roots_with(
desktop_dirs: &[PathBuf],
is_network: fn(&Path) -> bool,
) -> Vec<Root>
pub fn roots_with( desktop_dirs: &[PathBuf], is_network: fn(&Path) -> bool, ) -> Vec<Root>
As HomeState::roots, with the network test injected.
Sourcepub fn rebuild(&mut self, recents: &[PathBuf])
pub fn rebuild(&mut self, recents: &[PathBuf])
Build the home listing.
Recents lead, because for data on a mount the thing you want is almost always something you have opened before. Roots follow, each scanned one level deep.
Sourcepub fn rebuild_with(&mut self, recents: &[PathBuf], desktop_dirs: &[PathBuf])
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.
Sourcepub fn apply_listing(&mut self, listing: Listing)
pub fn apply_listing(&mut self, listing: Listing)
Install a listing built elsewhere, keeping the cursor on whatever it was on.
Sourcepub fn leave_mark(&mut self)
pub fn leave_mark(&mut self)
Remember where the cursor is before going inside something, so leaving comes
back to it. Call before browsing changes.
Sourcepub fn come_back(&mut self, from: Option<PathBuf>)
pub fn come_back(&mut self, from: Option<PathBuf>)
Come back to the place now browsed, from from: the filter and search it had,
and the cursor on the row it was on once the listing lands. Call after
browsing is set.
A place never entered from — Backspace above where the browse began — puts the cursor on the place just left instead, which is the row that leads back to it.
Sourcepub fn selected_key(&self) -> Option<RowKey>
pub fn selected_key(&self) -> Option<RowKey>
What the cursor is on, as something that survives the rows changing.
Sourcepub fn reselect(&mut self, key: Option<RowKey>) -> bool
pub fn reselect(&mut self, key: Option<RowKey>) -> bool
Put the cursor back on the row key names, if it is still on screen. Says
whether the cursor was placed by the key; when it was not, the cursor is
clamped, so a cursor left past the end by rows disappearing is never left there.
A row the cap has just hidden is still there, behind the more row that now
stands for it, so the cursor goes to that row rather than to whatever fell
into its index in the section below — and that counts as placed.
Sourcepub fn set_view_height(&mut self, height: usize)
pub fn set_view_height(&mut self, height: usize)
Tell the listing how tall the list is, keeping the cursor on the row it was on.
The cap on RECENT is a share of this height, so a shorter terminal takes rows
out from under the cursor and a taller one puts rows in above it. The renderer
calls this every frame; only a change in height does any work.
Sourcepub fn is_collapsed(&self, section: usize) -> bool
pub fn is_collapsed(&self, section: usize) -> bool
Whether a section is collapsed.
Sourcepub fn toggle_collapsed(&mut self, section: usize)
pub fn toggle_collapsed(&mut self, section: usize)
Collapse or expand a section.
Sourcepub fn set_collapsed(&mut self, section: usize, collapsed: bool)
pub fn set_collapsed(&mut self, section: usize, collapsed: bool)
Nothing is remembered while browsing: the listing browsed into is never drawn
folded (see section_folded), and a fold written for it would be a fold for
its path, which is the title the same directory has as a configured or current
directory section on the root listing.
Sourcepub fn jump_section(&mut self, delta: isize)
pub fn jump_section(&mut self, delta: isize)
Move the cursor to the next (delta > 0) or previous section header,
wrapping. The way past a long section to the one you came for.
Sourcepub fn has_any_dataset(&self) -> bool
pub fn has_any_dataset(&self) -> bool
Whether the listing holds anything openable at all, folded or not.
A lake table counts. datui cannot read one as a table yet, so it is not a dataset
— but it is somewhere to go, and a warehouse directory of fifty delta rows with
“No datasets here.” printed underneath them is plainly wrong.
So does a row nothing has looked into, for the same reason and more sharply: in a
fresh listing that is every directory in it, and any of them may turn out to be a
dataset. This is EntryKind::is_dataset rather than
EntryKind::is_known_dataset on purpose — the question is whether there is
anywhere to go, not how many datasets there are, which is what the control bar’s
count asks and answers differently.
Sourcepub fn cloud_source_of(&self, path: &Path) -> Option<&CloudSource>
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.
Sourcepub fn parent_of(&self, path: &Path) -> Option<PathBuf>
pub fn parent_of(&self, path: &Path) -> Option<PathBuf>
One level up from path. A bucket’s parent is the source that lists it, so
Backspace from a bucket returns to its source rather than to the home listing.
Sourcepub fn catalog_dataset(
&self,
path: &Path,
) -> Option<(&ShownCatalog, &ShownDataset)>
pub fn catalog_dataset( &self, path: &Path, ) -> Option<(&ShownCatalog, &ShownDataset)>
The catalog dataset listed at path itself.
Sourcepub fn bookmark(&self, path: &Path) -> Option<(&ShownDataset, &str)>
pub fn bookmark(&self, path: &Path) -> Option<(&ShownDataset, &str)>
The dataset a bookmark is listed under, and the bookmark’s name.
Sourcepub fn size_hint(&self, path: &Path) -> Option<u64>
pub fn size_hint(&self, path: &Path) -> Option<u64>
What a catalog says an HTTP(S) file at path weighs, while nothing has measured
it: shown as ~33 MB.
Sourcepub fn cloud_look(&self, entry: &Entry) -> Option<CloudLook>
pub fn cloud_look(&self, entry: &Entry) -> Option<CloudLook>
Where a directory in an object store is in being looked into, while its row has
no label of its own yet. None once the row says what it holds, or when it is not
such a directory.
Sourcepub fn place_kind(&self, path: &Path) -> Option<&'static str>
pub fn place_kind(&self, path: &Path) -> Option<&'static str>
What to call a place a source or catalog names itself: a remote dataset of a catalog, or a local one that is missing.
Sourcepub fn place_details(&self, path: &Path) -> Option<&[(String, String)]>
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.
Sourcepub fn location_label(&self, path: &Path) -> String
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, since neither cloud://<id> nor s3://<id>@bucket is
something to show a person.
Sourcepub fn sync_search_section(&mut self)
pub fn sync_search_section(&mut self)
Put the current search results into sections, or take them out.
Called after every rebuild and every batch of results. The section only exists while there is a filter: with none, every row matches, and twenty thousand matches is not a home screen.
Sourcepub fn search_batch(&mut self, root: &Path, found: Vec<Entry>, scanned: usize)
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.
Sourcepub fn score_job(&mut self) -> Option<ScoreJob>
pub fn score_job(&mut self) -> Option<ScoreJob>
The scoring a worker should do next, if one is owed: the filter has changed, or files arrived since the last. One at a time; the next is asked for when it answers.
Sourcepub fn search_scored(&mut self, epoch: u64, scored: Matches)
pub fn search_scored(&mut self, epoch: u64, scored: Matches)
A worker’s scoring is in.
Sourcepub fn search_finished(
&mut self,
root: &Path,
scanned: usize,
limited: Option<String>,
)
pub fn search_finished( &mut self, root: &Path, scanned: usize, limited: Option<String>, )
Record that the walk under root has finished.
pub fn visible(&self) -> Vec<Row<'_>>
Sourcepub fn listed(&self) -> Vec<Row<'_>>
pub fn listed(&self) -> Vec<Row<'_>>
Every row a section would show, with the cap on RECENT lifted.
For counting what is listed. The header says thirty and the more row says
twenty-seven more, so the control bar must not say three.
Sourcepub fn path_candidates(&self) -> Vec<&PathName>
pub fn path_candidates(&self) -> Vec<&PathName>
The names the ~ prompt offers: those in the directory being typed that its
last segment matches, best first. Hidden names only when a dot is typed.
Sourcepub fn pick_first_path(&mut self)
pub fn pick_first_path(&mut self)
Put the ~ prompt’s pick on the first name that matches what is typed, or on
none when nothing does: the list always shows which name Enter and Tab take.
↑ from the first takes the typed path as it is.
Sourcepub fn picked_path(&self) -> Option<String>
pub fn picked_path(&self) -> Option<String>
The path the picked candidate names, with its separator when it is a directory.
Sourcepub fn path_completion(&self) -> Option<String>
pub fn path_completion(&self) -> Option<String>
What Tab makes of the typed path: the one candidate whole, or the longest
start every candidate shares. None when it would add nothing.
Sourcepub fn known_urls(&self) -> Vec<String>
pub fn known_urls(&self) -> Vec<String>
Every URL the screen already knows: catalogs, buckets, what has been listed
and what the index remembers. What s3:// completes from.
Sourcepub fn selected_row(&self) -> Option<Row<'_>>
pub fn selected_row(&self) -> Option<Row<'_>>
The highlighted row, whatever it is.
Sourcepub fn selected_entry(&self) -> Option<Entry>
pub fn selected_entry(&self) -> Option<Entry>
The highlighted row, when it is a dataset rather than a section header.
The door counts: it is something to open, and every caller here wants what the
cursor is on. What it must not be is a row in a path-keyed map, which is why it
is Row::Door and not an entry among the section’s rows.
Sourcepub fn selection_is_the_door(&self) -> bool
pub fn selection_is_the_door(&self) -> bool
Whether the cursor is on the door rather than on something in the directory.
Sourcepub fn recents_in(&self, place: &Path) -> Vec<PathBuf>
pub fn recents_in(&self, place: &Path) -> Vec<PathBuf>
The recents that live in place: what Delete on its row forgets.
Sourcepub fn selected_section(&self) -> Option<usize>
pub fn selected_section(&self) -> Option<usize>
The section the highlighted row belongs to.
Sourcepub fn selected_catalog(&self) -> Option<&ShownCatalog>
pub fn selected_catalog(&self) -> Option<&ShownCatalog>
Whether the highlighted row is a section header. The catalog whose section heading is selected, if the selection is one.
pub fn selection_is_header(&self) -> bool
Sourcepub fn pending_probes(&self) -> Vec<PathBuf>
pub fn pending_probes(&self) -> Vec<PathBuf>
Remote roots that have neither answered nor been written off.
The caller probes these off the interface thread; nothing here may touch them.
Sourcepub fn below_browse_start(&self) -> bool
pub fn below_browse_start(&self) -> bool
Whether the browsed directory is strictly below where the browse began, so Esc still has a level to climb before it returns to the listing.
Sourcepub fn sections_waiting(&self) -> bool
pub fn sections_waiting(&self) -> bool
Whether any section on screen is still waiting for its rows.
Sourcepub fn awaiting_listing(&self) -> Option<&Path>
pub fn awaiting_listing(&self) -> Option<&Path>
The remote location being browsed, while its listing has not come back.
Sourcepub fn probe_ready(&mut self, root: PathBuf, rows: Vec<Entry>)
pub fn probe_ready(&mut self, root: PathBuf, rows: Vec<Entry>)
Record what a probe found. An empty listing is still an answer.
Sourcepub fn apply_cloud_kinds(&mut self, root: &Path)
pub fn apply_cloud_kinds(&mut self, root: &Path)
Label the rows of a cloud listing with what peeking inside them found.
Sourcepub fn cloud_directories_to_peek(&self, limit: usize) -> Vec<PathBuf>
pub fn cloud_directories_to_peek(&self, limit: usize) -> Vec<PathBuf>
The cloud directories on or near the screen that nothing has peeked into, at most
limit, the highlighted row first.
Self::unclassified_visible’s cloud twin, and deliberately the same shape: a
peek is a request, and the rows worth spending one on are the rows somebody is
looking at. It used to take the first forty-eight directories of each listing,
once per session — so a bucket of two hundred prefixes had its first forty-eight
labelled and the rest reading dir for good, however long you spent on them,
while paging straight past the first forty-eight spent forty-eight requests on
rows nobody saw. The cap and its never-again claim both go: the bound is what the
cursor rests on.
Sourcepub fn probe_failed(&mut self, root: PathBuf)
pub fn probe_failed(&mut self, root: PathBuf)
Record that a probe could not read the root.
Sourcepub fn measure_now(&mut self, limit: usize) -> bool
pub fn measure_now(&mut self, limit: usize) -> bool
Measure a batch of rows on the calling thread.
For tests and library callers that know their paths are safe. The application
never calls this: reading a footer opens a file, which blocks on a FIFO, a
device node, a wedged mount or a failing disk. In the app the interface thread
only ever decides what to measure, via HomeState::unmeasured_visible, and
a worker does the reading.
Sourcepub fn unmeasured_visible(&self, limit: usize) -> Vec<Entry>
pub fn unmeasured_visible(&self, limit: usize) -> Vec<Entry>
Rows on screen that have not been measured yet, up to limit.
The interface thread decides what is worth measuring — it knows what is visible — and a worker does the reading.
Sourcepub fn classify_now(&mut self, limit: usize) -> bool
pub fn classify_now(&mut self, limit: usize) -> bool
Look into a batch of rows on the calling thread.
For tests and library callers, exactly as HomeState::measure_now is, and
for the same reason the application never calls it: read_dir on a wedged
mount blocks, and the thread that draws must never be the one it blocks.
Sourcepub fn unclassified_visible(&self, limit: usize) -> Vec<Entry>
pub fn unclassified_visible(&self, limit: usize) -> Vec<Entry>
Rows on or near the screen that nothing has looked into yet, up to limit.
HomeState::unmeasured_visible’s sibling, and deliberately a different
shape. Measuring walks the list from the top, which is affordable because
every row wants a count eventually and a listing of a few hundred gets there.
Classifying cannot work that way: a share holding six thousand date
partitions would spend ten seconds reaching the row you scrolled to, and the
rows on screen are the only ones anybody is reading. So this asks the
viewport, plus a screen either side so arrowing off the edge does not wait for
a round trip.
The highlighted row comes first, then the rest of the screen, then the screen below, then the screen above: when the batch is smaller than the window, the buffer is what goes without.
The highlighted row first because it is the one about to be acted on. → goes inside a directory that holds one dataset and folds the section otherwise, and the control bar offers the key on the same test, so both read better for the row being looked into in the first pass rather than the third.
Sourcepub fn apply_measurements(&mut self)
pub fn apply_measurements(&mut self)
Fold known measurements into the rows currently listed.
Sourcepub fn select_first_entry(&mut self)
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.
pub fn clamp_selection(&mut self)
Sourcepub fn select(&mut self, index: usize)
pub fn select(&mut self, index: usize)
Put the selection on row index of what is listed, as a click does.
pub fn move_selection(&mut self, delta: isize)
Sourcepub fn page_selection(&mut self, delta: isize)
pub fn page_selection(&mut self, delta: isize)
Move the selection delta rows, stopping at the first and last rather than
wrapping. A step of one wraps, which is a quick way round; a jump of ten that
wrapped landed somewhere near the top with nothing to say it had gone round.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HomeState
impl !UnwindSafe for HomeState
impl Freeze for HomeState
impl Send for HomeState
impl Sync for HomeState
impl Unpin for HomeState
impl UnsafeUnpin for HomeState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more