Skip to main content

AppEvent

Enum AppEvent 

Source
pub enum AppEvent {
Show 51 variants Key(KeyEvent), Press(KeyEvent), Terminal(Event), Wake, TerminalBackground(ThemeMode), TerminalFocused, SettingsRead(Box<Result<Settings>>), OpenNamed(Vec<PathBuf>, OpenOptions), NamedPathMissing(PathBuf), Open(Vec<PathBuf>, OpenOptions), OpenLazyFrame(Box<LazyFrame>, OpenOptions), HomeListingReady { generation: u64, listing: Box<Listing>, known: HashMap<PathBuf, DatasetFacts>, visits: HashMap<PathBuf, Visits>, newest: Option<PathBuf>, folds: Option<HashMap<String, bool>>, }, HomeListingFailed, HomePathListed { listing: Box<PathListing>, }, HomePathCompleted { generation: u64, typed: String, completed: String, candidates: usize, }, HomePreviewReady { path: PathBuf, stamp: Stamp, read_at: Option<Stamp>, rows: Option<Arc<PreviewRows>>, prepared: Handoff, }, HomeSchemaReady { generation: u64, path: PathBuf, preview: Option<SchemaPreview>, }, HomeMeasured { measured: Vec<(PathBuf, Measured)>, done: bool, }, HomeSized { path: PathBuf, measured: Measured, }, HomeWebGone { path: PathBuf, gone: HttpGone, }, HomeClassified { measured: Vec<(PathBuf, Measured)>, done: bool, }, HomeSearchBatch { generation: u64, root: PathBuf, found: Vec<Entry>, scanned: usize, }, HomeSearchScored { epoch: u64, matches: Option<Box<Matches>>, }, HomeSearchDone { generation: u64, root: PathBuf, scanned: usize, limited: Option<String>, }, HomeCloudSources { sources: Vec<CloudSource>, }, HomeCloudListed { id: String, buckets: Vec<PathBuf>, details: Vec<(PathBuf, Vec<(String, String)>)>, failure: Option<(String, String)>, listed_at: SystemTime, }, HomeProbeReady { root: PathBuf, rows: Option<Vec<Entry>>, cut_short: bool, }, HomeProbeProgress { root: PathBuf, rows: Vec<Entry>, }, HomeCloudKinds { kinds: Vec<(PathBuf, (EntryKind, Holds))>, failed: Vec<PathBuf>, }, HomeProbeCancelled { root: PathBuf, }, HomeNarrowed { dir: PathBuf, prefix: String, listed: Option<(Vec<Entry>, bool)>, }, HomeProbeFailed { root: PathBuf, message: String, }, Followed(News), Exit, Crash(String), Applied(Applied), Collect, Update, Reset, Resize(u16, u16), Scroll(Scroll), AnalysisCompute(AnalysisTool), BackgroundQualitySampleKept { kept: KeptQualitySample, }, BackgroundQualityCopyKept { dataset_generation: u64, copy: Option<Arc<LocalCopy>>, }, BackgroundLenReady { len_generation: u64, num_rows: usize, file_row_groups: Option<Vec<Vec<usize>>>, }, BackgroundLenFailed { len_generation: u64, }, FramePainted, LookThenOpenDirectory(PathBuf, OpenOptions), ClassifyThenOpen { path: PathBuf, jump: bool, }, JobEnded(Ticket), JobProgress { ticket: Ticket, progress: Progress, },
}

Variants§

§

Key(KeyEvent)

§

Press(KeyEvent)

A key taken as if typed (Enter on a help line). The pump runs it through classify like a typed key; outside the pump it is a Key.

§

Terminal(Event)

Read from the terminal by app::terminal_input::TerminalInput. The app::event_pump::EventPump turns it into Key/Resize.

§

Wake

Something polled rather than sent changed (a background panic, a Polars warning): wakes the loop. Handled as nothing.

§

TerminalBackground(ThemeMode)

The terminal’s background (an OSC 11 reply); theme.mode = "auto" follows it.

§

TerminalFocused

The terminal regained focus: under auto the background is asked again.

§

SettingsRead(Box<Result<Settings>>)

Settings run reads on a worker before building the app; never reaches the app.

§

OpenNamed(Vec<PathBuf>, OpenOptions)

Paths from the command line or the Python binding, checked on a worker (JobKind::OpenNamed): a local-looking path may be a slow mount.

§

NamedPathMissing(PathBuf)

A path named on the command line is not there: the session ends.

§

Open(Vec<PathBuf>, OpenOptions)

Open these paths, through the loading controller’s phases.

§

OpenLazyFrame(Box<LazyFrame>, OpenOptions)

Open with an existing LazyFrame (e.g. from Python binding); no file load.

§

HomeListingReady

A home listing built off-thread is ready.

Fields

§generation: u64
§listing: Box<Listing>
§known: HashMap<PathBuf, DatasetFacts>

What earlier runs measured, read from the cache with the listing.

§visits: HashMap<PathBuf, Visits>

How often and how lately each recent was opened.

§newest: Option<PathBuf>

The recent opened last, where the cursor lands.

§folds: Option<HashMap<String, bool>>

The saved folds, when entering the home screen asked for them.

§

HomeListingFailed

The home listing worker panicked; the panic is flashed.

§

HomePathListed

The directory the ~ prompt is typing, read off-thread.

Fields

§listing: Box<PathListing>
§

HomePathCompleted

A completed path, worked out off-thread.

Fields

§generation: u64
§typed: String

What was typed when completion was asked; a later keystroke makes it stale.

§completed: String
§candidates: usize
§

HomePreviewReady

The highlighted file’s first rows, read as its open reads them, and the dataset that read built, for the open to install.

Fields

§path: PathBuf
§stamp: Stamp

The row’s stamp when it was asked for: what the rows are kept under.

§read_at: Option<Stamp>

The file’s stamp when it was read: what the dataset is installed under.

§prepared: Handoff
§

HomeSchemaReady

A schema read off-thread for the highlighted dataset.

Fields

§generation: u64
§path: PathBuf
§

HomeMeasured

Measurements for home rows, sent per row so a slow one holds back no other. done ends the batch. No generation: a measurement is keyed by path and stays true whichever listing asked.

Fields

§measured: Vec<(PathBuf, Measured)>
§done: bool
§

HomeSized

What a HEAD said an HTTP(S) file on home weighs: its row, measured.

Fields

§path: PathBuf
§measured: Measured
§

HomeWebGone

What a HEAD settled about an HTTP(S) file on home: it cannot be had.

Fields

§path: PathBuf
§

HomeClassified

What the rows on screen turned out to be; folded like AppEvent::HomeMeasured.

Fields

§measured: Vec<(PathBuf, Measured)>
§done: bool
§

HomeSearchBatch

A batch of datasets from the background search, sent repeatedly while it walks.

Fields

§generation: u64
§root: PathBuf
§found: Vec<Entry>
§scanned: usize
§

HomeSearchScored

The filter scored against the search’s files, for the walk epoch names.

Fields

§epoch: u64
§matches: Option<Box<Matches>>

None from a worker that died.

§

HomeSearchDone

The background search stopped; limited says why if it stopped short.

Fields

§generation: u64
§root: PathBuf
§scanned: usize
§limited: Option<String>
§

HomeCloudSources

The cloud sources on this machine with what an earlier run listed, sent before anything is fetched.

Fields

§sources: Vec<CloudSource>
§

HomeCloudListed

One source’s buckets listed, or not. Each source reports on its own.

Fields

§buckets: Vec<PathBuf>
§details: Vec<(PathBuf, Vec<(String, String)>)>

Lines for the details pane of each listed place that has any.

§failure: Option<(String, String)>

(short, detail) when the listing failed.

§listed_at: SystemTime
§

HomeProbeReady

A network root has been listed off-thread, or could not be.

Fields

§root: PathBuf
§cut_short: bool
§

HomeProbeProgress

Rows of a network directory read since its last batch.

Fields

§root: PathBuf
§rows: Vec<Entry>
§

HomeCloudKinds

Cloud directories that peeking found to be partitioned or Parquet datasets.

Fields

§failed: Vec<PathBuf>

Directories whose peek failed or was lost, so left unlabeled.

§

HomeProbeCancelled

A cloud listing stopped because its place was left; it is listed again on return.

Fields

§root: PathBuf
§

HomeNarrowed

Names under prefix in a cut-short cloud directory, asked for by a filter; None when the listing failed or was stopped.

Fields

§prefix: String
§listed: Option<(Vec<Entry>, bool)>
§

HomeProbeFailed

A cloud listing was refused, with the service’s reason.

Fields

§root: PathBuf
§message: String
§

Followed(News)

A followed file’s watcher found more rows, or that the file went.

§

Exit

§

Crash(String)

§

Applied(Applied)

A dialog or prompt answered: what it asks of the app. See Applied.

§

Collect

§

Update

§

Reset

§

Resize(u16, u16)

§

Scroll(Scroll)

A scroll deferred one frame, so the spinner shows while its rows are read.

§

AnalysisCompute(AnalysisTool)

Run an analysis tool off the UI thread; deferred so its progress shows first.

§

BackgroundQualitySampleKept

The sample a stopped Data Quality run had read, kept for the next run.

§

BackgroundQualityCopyKept

A full scan’s local copy of a remote dataset, kept for that dataset. None when the copy did not read as the source.

Fields

§dataset_generation: u64
§

BackgroundLenReady

The exact row count for the current LazyFrame, applied only if len_generation still matches. Runs alongside the first paint, never blocking it.

Fields

§len_generation: u64
§num_rows: usize
§file_row_groups: Option<Vec<Vec<usize>>>

For a remote multi-file dataset, each file’s row-group sizes from its footer.

§

BackgroundLenFailed

The row count failed: the total stays unknown. Scrolling does not count again; End does.

Fields

§len_generation: u64
§

FramePainted

A frame was painted. The run loop calls App::frame_painted; a harness sends this when App::count_waits_for_a_frame.

§

LookThenOpenDirectory(PathBuf, OpenOptions)

A directory named on the command line: look at it on a worker, then do what Enter on its row would. An event so the first frame, with a spinner and a way out, is drawn before a look that can take seconds.

§

ClassifyThenOpen

Look at a path off the UI thread, then browse into it, report a lake table, or open it. The filesystem calls can hang on a slow mount.

Fields

§path: PathBuf
§jump: bool

A path typed at ~ rather than a listed row: Esc returns to the listing.

§

JobEnded(Ticket)

A background job’s outcome is in its record: app::jobs::Jobs::end takes it.

§

JobProgress

A report from a background job still running.

Fields

§ticket: Ticket
§progress: Progress

Implementations§

Source§

impl AppEvent

Source

pub fn is_progress(&self) -> bool

A report sent many times while work runs: the loop may fold several into one frame. A measuring batch’s end too: batches of tiny files end a few a millisecond, and a frame each cost more than the measuring.

Trait Implementations§

Source§

impl From<Applied> for AppEvent

Source§

fn from(applied: Applied) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

Source§

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

Source§

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

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

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

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

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

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

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

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

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

Source§

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<D> OwoColorize for D

Source§

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

Set the foreground color generically Read more
Source§

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

Set the background color generically. Read more
Source§

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

Change the foreground color to black
Source§

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

Change the background color to black
Source§

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

Change the foreground color to red
Source§

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

Change the background color to red
Source§

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

Change the foreground color to green
Source§

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

Change the background color to green
Source§

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

Change the foreground color to yellow
Source§

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

Change the background color to yellow
Source§

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

Change the foreground color to blue
Source§

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

Change the background color to blue
Source§

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

Change the foreground color to magenta
Source§

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

Change the background color to magenta
Source§

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

Change the foreground color to purple
Source§

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

Change the background color to purple
Source§

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

Change the foreground color to cyan
Source§

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

Change the background color to cyan
Source§

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

Change the foreground color to white
Source§

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

Change the background color to white
Source§

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

Change the foreground color to the terminal default
Source§

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

Change the background color to the terminal default
Source§

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

Change the foreground color to bright black
Source§

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

Change the background color to bright black
Source§

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

Change the foreground color to bright red
Source§

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

Change the background color to bright red
Source§

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

Change the foreground color to bright green
Source§

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

Change the background color to bright green
Source§

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

Change the foreground color to bright yellow
Source§

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

Change the background color to bright yellow
Source§

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

Change the foreground color to bright blue
Source§

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

Change the background color to bright blue
Source§

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

Change the foreground color to bright magenta
Source§

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

Change the background color to bright magenta
Source§

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

Change the foreground color to bright purple
Source§

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

Change the background color to bright purple
Source§

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

Change the foreground color to bright cyan
Source§

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

Change the background color to bright cyan
Source§

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

Change the foreground color to bright white
Source§

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

Change the background color to bright white
Source§

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

Make the text bold
Source§

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

Make the text dim
Source§

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

Make the text italicized
Source§

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

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

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

Swap the foreground and background colors
Source§

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

Hide the text
Source§

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

Cross out the text
Source§

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

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

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

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

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

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

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

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

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

Sets the foreground color to an RGB value.
Source§

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

Sets the background color to an RGB value.
Source§

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

Apply a runtime-determined style
Source§

impl<T> PlanCallbackArgs for T

Source§

impl<T> PlanCallbackOut for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

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

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

Source§

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

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

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

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

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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

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

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

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